Zum Hauptinhalt springen

Condition

Category: Control
Node id: condition

Evaluates a condition on input data and routes to true/false branches

What it does​

  • 10 comparison operators (equals, contains, greater_than, etc.)
  • Numeric and string comparison with type coercion
  • Null/empty detection with is_empty and is_not_empty
  • Boolean branching output for pipeline routing

Use cases​

  • Route patients to different care pathways based on risk score
  • Branch pipeline logic based on FHIR resource type
  • Filter records by threshold values

Runtime​

  • Performance tier: fast

Input ports​

NameTypeRequiredDescription
fieldanyYesDynamic input field to evaluate (name set by 'field' config)
contextanyNoOptional value carried across the gate untouched. Name it in pass_through to hand it to the taken branch, e.g. pass_through: {"message": "context"}. Exists so a gated node can receive data without an un-gated edge keeping it alive.

Output ports​

NameTypeRequiredDescription
truejsonNoBranch taken when condition is satisfied — connect downstream nodes here for the true path
falsejsonNoBranch taken when condition is NOT satisfied — connect downstream nodes here for the false path
condition_metbooleanNoTop-level boolean — available on the merged input map of any downstream node for convenience
successbooleanNoWhether the evaluation completed without error

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
FieldfieldstringYesName of the input field to evaluate
Condition Typecondition_typeenumNoequalsequals, not_equals, greater_than, less_than, greater_than_equals, less_than_equals, contains, not_contains, is_empty, is_not_emptyType of comparison to perform
Compare Valuecompare_valueanyNoValue to compare against (not required for is_empty/is_not_empty)

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Pass Throughpass_throughjsonNoInputs to copy onto the taken branch, as {target_name: input_key}. Lets a downstream node that is gated by this condition still receive data, e.g. {"message": "transcript"} hands the transcript to an agent-run node on the true branch.

Errors​

CodeDescription
UNSUPPORTED_CONDITIONThe specified condition_type is not recognized
TYPE_MISMATCHCannot compare values of incompatible types for numeric operators

Runtime notes​

  • Connect downstream nodes to the 'true' or 'false' output port — the executor skips nodes on the inactive branch.
  • Only one of the two branch ports is active per execution; nodes connected to the inactive port are skipped entirely.
  • condition_met is also available as a top-level key in the merged input map for nodes that need it directly.
  • is_empty and is_not_empty do not require compare_value; all other condition types do.

See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.

Etwas unklar? Senden Sie Feedback zur Dokumentation per E-Mail..