Abort Flow Block
Stop the execution of the entire flow immediately, either successfully or with an error
Overview
The Abort Flow Block is used to stop the execution of the entire flow immediately. It can either “successfully” abort the flow (early-exit), or “error” abort the flow. This block is useful for stopping the flow under certain conditions or for handling errors.
Inputs
The message to abort the graph with. If provided as a string when error aborting, this will be used as the error message.
Whether to successfully abort the graph (early-exit), or error abort the graph. Only available when “Use Successfully Input” is enabled in settings.
Outputs
This block does not have any outputs.
Editor Settings
Whether to successfully abort the graph (early-exit), or error abort the graph. Can be overridden by the “successfully” input if “Use Successfully Input” is enabled.
When enabled, adds a “successfully” input port that can override the “Successfully Abort” setting.
The error message to use when error aborting (when not successfully aborting). Only used if no message is provided via the data input.
Example: Successfully aborting a flow
- Add an Abort Flow block to your flow.
- Make sure the “Successfully Abort” setting is checked.
- Connect any block to the
data
input of the Abort Flow block. - Run your flow. The flow will abort immediately after the Abort Flow block is processed.
Example: Aborting a flow with an error
- Add an Abort Flow block to your flow.
- Uncheck the “Successfully Abort” setting.
- Optionally, enter an error message in the “Error Message” setting.
- Connect any block to the
data
input of the Abort Flow block. - Run your flow. The flow will abort with an error message.
Error Handling
The Abort Flow Block does not produce any errors itself. However, it causes the entire flow to stop executing when it is processed, either successfully or with an error.
When error aborting, the error message is determined in this order:
- The trimmed string value from the
data
input, if provided - The “Error Message” setting value, if configured
- Default message: “Graph aborted with error”
Be cautious when using this block, as it will immediately stop the execution of your entire flow.