Using Subflows
You can build your own reusable components by creating subflows. A subflow is just a regular flow with a special subflow
tag. Once created, the subflow appears as a component under the Subflows library, and you can use it like any other component.
Subflow Connectors
To pass data to a subflow, you'll need to define the connectors for the flow, as well as any flow parameters you need. Within the subflow, add a Subflow Connector
component for each input/output to your flow:
Configure the connector’s properties to match the connection you would like to accept.
After saving the properties, the component will automatically update to reflect the available connector in your subflow:
Flow Parameters
Flow Parameters in your subflow will appear in the parent flow as properties in the component. This allows multiple implementations of the same subflow to have different parameter values.
Example
This is a subflow from the Warehouse sample app that processes waiting customer orders.
Using a Subflow
To use a subflow in another flow, look under the Subflows flow component library where it appears as a flow component:
Then drag it into the edit area and connect it: