Step flow
The automation's ConstructTask returns a list of steps. Each step returns a "flowprotocol.TaskStepResult", which is essentially just a regular Golang with an explicit "NextStepLabel" field to enable automations to have non linear step flows.
How TaskStepResult works
If "NextStepLabel" is set, then that step will be performed next by the task.
Otherwise, if there was an error, then the task will sleep for the error delay and then retry the step.
If there was no error, then the next step in the step list will be performed.
Step lifecycle hooks
Step lifecycle hooks can be used to introduce additional flow logic. These hooks receive a pointer to the "TaskStep" before it gets executed, or the "TaskStepResult" before it gets processed.
This can be used to do things like "rotate the proxy after 3 consecutive 403 errors" or similar.
Step groupings
The "StepGrouping" field is a purely cosmetic property that tells the frontend how to group step statuses. This is visible in the Bulk status view
Last updated