Reusing flows
The articles so far demonstrate flows being used by APIs and schedules. It is also possible to nest flows and have one flow conditionally pass its document to another flow for processing. This enables reusing logic and not having to configure the same steps in every flow.
The two primary ways to connect one flow to another are:
- Using steps that support flow attachment
- Converting a flow into an ACE step
Using steps
The most basic way to nest flows is by using special steps that allow attaching flows.
Mixed-flow step
Feature rich step which can pass the current document to another flow for processing. To setup a Mixed step add it to your flow and in the configuration select the flow you intend to target.
Catch
Only executes attached flow if the document contains errors in the errors
node. For example, you might have a flow that maps and logs encountered errors. The error logging flow could be attached to other flows by using a Catch step.
Creating virtual steps
ACE enables you to create custom steps by wrapping a flow in a user defined form. There is extra groundwork required because the virtual step needs to define a schema which is visualized as the step form.
The benefit of creating a virtual step instead of using a Mixed step is the ability to explicitly define what data is expected. Additionaly, data passed to the step is validated against the virtual step schema.
Read in detail about virtual steps here.
As a shortcut you can generate a new virtual step directly from a flow by clicking the convert button: