Skip to content

Checklist

Compare values, or two lists row by row, and send differences for review.

@lainstack/flow/checklist · Flow

Use this block to run several named checks at once and get a report plus a results file with one row per compared item. For one yes or no branch use @lainstack/flow/condition. To stop on the first mismatch use @lainstack/flow/assert.

Check kinds: a built-in operator compares observed with expected (the valid operators depend on the value type; tolerance applies to equals on numbers and dates), or a JavaScript script returns true or false.

Results of one check:

  • match: it passed.
  • discrepancy: both values were present and the check said no.
  • unable: a value was missing or unavailable, so nothing was compared.
  • error: a JavaScript check threw, returned a non-boolean, or timed out. Any result except match makes the row a finding.

Ports: approved when no finding exists. With findings and no review set, rejected. With review set, a finding opens an escalation. The reviewer can correct values (only on checks with allowCorrection), which reruns the checks, accept rows, approve, or reject (port rejected). bypassed means the findings were accepted or approved. A review timeout fails the step with review_timed_out, and 10 rounds of correction fail it too.

Modes: in value mode each check has its own values and the result is one row. In list mode (lists), two sides, each a list of records or a table (at most 10,000 rows and 10 MiB, else the step fails), join on 1 to 3 key column pairs. Checks run per matched pair. Observed reads the left row and expected the right row, each as one whole column. Unmatched rows are findings or notes (unmatched). Repeated keys are findings or fail the step (duplicates). A blank key is always a finding. Keys ignore letter case and outer spaces unless keySettings say otherwise. List mode allows 20 checks, value mode 100. The report shows only the first 25 findings. Read results for all rows.

Before writing or changing a JavaScript comparison, read guide javascript.predicate.

Setting Key Type Details
Checks (required) checks List Compare values, or two lists row by row, and send differences for review. At most 100 items.
Output Path Type
Results results Value
Exit Port Notes
Approved approved
Bypassed bypassed
Rejected rejected