parallel
Executes multiple action branches simultaneously. Each branch runs independently and can have its own chain of subsequent actions.Steps
A list of action steps to execute in parallel. Each step is a reference to another action in the workflow.
Each step follows the format
action.action_id where action_id is the identifier of another action in your workflow.
Stop On Failure
Whether to stop all parallel branches when any branch fails. Whentrue, remaining branches are cancelled on the first failure.
Setting this to
false allows all branches to complete even if some fail, useful when you want partial results.
Examples
Fetch Multiple Data Sources
Retrieve data from multiple tables simultaneously:{{ .fetch_users }}— Results from the users query{{ .fetch_orders }}— Results from the orders query{{ .fetch_products }}— Results from the products query
Parallel API Calls
Call multiple external APIs at the same time:Parallel with Chained Actions
Each parallel branch can have its own chain of subsequent actions:Graceful Degradation
Allow partial failures to continue the workflow:Best Practices
Independent Operations: Only use parallel for actions that don’t depend on each other’s results. If action B needs the result of action A, they must run sequentially.
Next Steps
Data Operations
Learn about fetching and storing data from databases.
HTTP Requests
Make parallel calls to external APIs.
Transformation
Combine and transform parallel results with JavaScript.
Actions Overview
Learn the fundamentals of actions in ServFlow.