Execution Conditions
Conditions are lightweight guards that decide whether a node should run. Three checks are available:
exist: the specified key must already exist in the pipeline context.not_exist: the key must be absent to continue.condition: a boolean expression (with optional variable placeholders) must evaluate totrue.
The system evaluates the fields in order. If any check fails, the node is skipped and returns an error.
Field Reference
| Field | Type | Description |
|---|---|---|
exist | string | Context key that must exist, e.g. find-btn.btn.png. Missing keys fail fast. |
not_exist | string | Key that must not exist, useful for preventing duplicate execution. |
condition | string | Boolean expression. After variable interpolation the value is evaluated via evalexpr and must return true. |
When multiple fields are present, validation order is
exist→not_exist→condition.
Variable Placeholders
Values inside exist, not_exist, and condition can reference context variables such as ${find-btn.btn.png.x}. During validation the runtime calls parse_variables, replaces the placeholders with actual values, and then evaluates the result.
YAML Examples
conditions:
exist: "find-submit.submit.png"Continue only if a previous image-recognition node already found
submit.png.
conditions:
not_exist: "completed"Abort the node when the
completedflag is already present to avoid duplicate work.
conditions:
exist: "find-input.input.png"
condition: "${find-input.input.png.x} > 500 && ${env} == \"prod\""Require both the element to exist and its X coordinate to be greater than 500 in the production environment.
Usage Tips
- Prefer
exist/not_existfor simple presence checks—they are faster than evaluating expressions. - Expressions must return a boolean; non-boolean results raise an
... is not booleanerror. - Keep variable names consistent with upstream node outputs (e.g.
find-node.image.png). - If you need a soft failure, isolate the node in its own stage and gate the stage instead of throwing an error.