You can use jumps to control what step in your workflow will execute next. For example, at the end of any step, you can use next
to define what step should execute next:
YAML
- STEP_NAME: ... next: STEP_NAME_TO_JUMP_TO
JSON
[ { "STEP_NAME": { ... "next": "STEP_NAME_TO_JUMP_TO" } } ]
You can also use next
to do the following:
To change the flow of a
for
loop, you can usenext: break
ornext: continue
. For more information, see Use break/continue in a loop.To stop the execution of a workflow or subworkflow, you can use
next: end
. For more information, see Complete the execution of a workflow.
For more information about defining a workflow's order of execution, see Conditions and Control the order of execution in a workflow.
Explicit step ordering using jumps
This sample uses the next:
command to explicitly define the sequence of workflow steps. In this sample, steps are executed in a different order than they appear in the workflow definition.