Skip to Content
đź‘‹ Hey, welcome to Auto Engine! We've just released the latest Beta version 0.2.0 Check it out
DocumentsNodesExecution Conditions

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 to true.

The system evaluates the fields in order. If any check fails, the node is skipped and returns an error.

Field Reference

FieldTypeDescription
existstringContext key that must exist, e.g. find-btn.btn.png. Missing keys fail fast.
not_existstringKey that must not exist, useful for preventing duplicate execution.
conditionstringBoolean 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 completed flag 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_exist for simple presence checks—they are faster than evaluating expressions.
  • Expressions must return a boolean; non-boolean results raise an ... is not boolean error.
  • 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.
Last updated on: