Flow actions and subflows
Build reusable automation: action steps, inputs and outputs, subflows, and when a script step is justified.
Build reusable automation: action steps, inputs and outputs, subflows, and when a script step is justified.
- Actions and subflows are how flows stay maintainable
- Inputs and outputs make automation testable
- Script steps are an exception, not a default
- Configure error handling explicitly on every external call
Actions are reusable units
An action takes inputs, runs steps such as look up records, create record or REST, and returns outputs. Because it is reusable, a well named action with clear inputs is worth more than the same logic copied into three flows.
Subflows
A subflow is a flow that other flows call, with its own inputs and outputs. Use subflows for shared process, for example an approval pattern used by several catalog items, so a change happens in one place.
Script steps
Flow Designer supports a script step, and it is easy to overuse.
- Prefer no code steps so the flow stays readable to process owners
- Use a script step for data shaping the standard steps cannot do
- Keep the script short and pure, no side effects that the flow does not report
- If a script step grows past twenty lines, move it into an action or a script include
Error handling
Set the error handling on each action so a failure either stops the flow or continues down an error path. Silent failures in automation are worse than loud ones.