The rollback behavior is determined by the mode parameter, which can be either TOKEN or ANY.
TOKEN Mode
In TOKEN mode, rollback follows the original execution path in reverse (if sub-processes exist, they are rolled back before the main process). It calls the specific rollback method on each node along the path.
Constraints for TOKEN mode:
- Task Status: Only tasks in
RUNNING or ROLL_BACK_FAILED states can be rolled back. Finished or paused tasks cannot be rolled back. - Tokens: The start node and target node must share the same token. No other nodes with the same token can be currently
RUNNING. - Start Node: Must be a terminal node of the currently running pipeline and must be in
FINISHED or FAILED state. - Target Node: Must be in
FINISHED state and must be a task-type node (gateway nodes are not supported). - Rollback Reservation: You can reserve a rollback for a
RUNNING node; the rollback triggers automatically when that node finishes. Only one reservation is allowed per pipeline.
ANY Mode
In ANY mode, the pipeline jumps directly to the target node. It does not follow the path or call the nodes' rollback methods. Instead, it deletes the execution information of the nodes on the rollback path and resumes from the target location.
Constraints for ANY mode:
- Task Status: Only
RUNNING tasks are eligible. Finished or paused tasks are not. - Running Nodes: No nodes in the current pipeline can be in a
RUNNING state before the rollback begins. - Start Node: Must be the current terminal node of the pipeline and must be in
FINISHED or FAILED state. - Target Node: Must be in
FINISHED state and must be a task-type node. - Rollback Reservation: Similar to TOKEN mode, you can reserve a rollback for a
RUNNING node. Only one reservation is allowed per pipeline.