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

data
any

The message to abort the graph with. If provided as a string when error aborting, this will be used as the error message.

successfully
boolean

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

Successfully Abort
boolean
default:true

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.

Use Successfully Input
boolean
default:false

When enabled, adds a “successfully” input port that can override the “Successfully Abort” setting.

Error Message
string

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

  1. Add an Abort Flow block to your flow.
  2. Make sure the “Successfully Abort” setting is checked.
  3. Connect any block to the data input of the Abort Flow block.
  4. Run your flow. The flow will abort immediately after the Abort Flow block is processed.

Example: Aborting a flow with an error

  1. Add an Abort Flow block to your flow.
  2. Uncheck the “Successfully Abort” setting.
  3. Optionally, enter an error message in the “Error Message” setting.
  4. Connect any block to the data input of the Abort Flow block.
  5. 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:

  1. The trimmed string value from the data input, if provided
  2. The “Error Message” setting value, if configured
  3. Default message: “Graph aborted with error”

Be cautious when using this block, as it will immediately stop the execution of your entire flow.

FAQ

See Also