Edit on GitHub

If-Then-Else Flow

A schema that is used to validate a part of Laboperator workflow templates.

A conditional flow of steps or nested flow control schemas. In the well known if-then-else fashion a conditional flow through the workflow can be implemented.

If-Then-Else Flow
ifrequired
reference
Script

The condition has access to all global fields of the workflow. Local step fields cannot be referenced in a condition. Any string result or numerical result other then zero will be considered truthy and trigger execution of the then workflow. A falsy value will trigger execution of the else workflow.

thenrequired
reference
Flow Control
else
reference
Flow Control
Examples:
if: field1 > 100
then:
  - step1
  - step2
else: step3
if: field1 != field2
then: step3
Where is this used?
Other schemas that have a reference ($ref) to this schema.