Overview

The Flow Output Block is a crucial component for defining the outputs of a flow. Each instance of this block represents an individual output, where the value passed into it becomes part of the overall flow output. When a flow is used as a subflow, each Flow Output Block transforms into an output port on the subflow block.

Inputs

value
any
required

The value to be outputted from the flow. The data type should match the type specified in the Editor Settings.

Outputs

valueOutput
any

The value that was passed into the block. The data type matches the type specified in the Editor Settings.

Editor Settings

id
string
default:"output"
required

The unique identifier for the output. This ID is used when referencing the output and defines the output port name when used as a subflow.

dataType
string
default:"string"

Specifies the expected data type for the output. The input value will be coerced to this type if necessary.

Examples

Basic Output Definition

  1. Create a Text Block with the value “Hello, world!”
  2. Add a Flow Output Block and set the ID to “greeting” and Data Type to “String”
  3. Connect the Text Block to the Flow Output Block’s Value input
  4. In another flow, use a Subflow Block referencing the first flow
  5. Run the second flow to see the “greeting” output with the value “Hello, world!”

Error Handling

The Flow Output Block will generate an error if the data type of the input value doesn’t match the specified Data Type in the Editor Settings.

Always ensure that the input value matches the specified Data Type to avoid runtime errors.

FAQ

See Also