Skip to content

Commit e29f7a6

Browse files
committed
parallel updates
1 parent 447c2b1 commit e29f7a6

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

docs-v2/pages/workflows/control-flow/_meta.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"index": "Overview",
33
"ifelse": "Branching - If/Else",
44
"switch": "Branching - Switch",
5+
"parallel": "Branching - Parallel",
56
"delay": "Delay",
67
"filter": "Filter",
78
"end-workflow": "End Workflow"
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import Callout from '@/components/Callout'
2+
import VideoPlayer from "@/components/VideoPlayer";
3+
import { Steps } from 'nextra/components'
4+
5+
# Parallel
6+
7+
## Overview
8+
9+
**Parallel** is multi-path branching operator. You can create multiple execution branches with optional filtering rule and Pipedream will execute **all** matching branches. Unlike `Switch` and `If/Else`, the order in which rules are defined will not affect the path of execution.
10+
11+
![Switch Configuration](./images/switch/switch-configuration.png)
12+
13+
## Capabilities
14+
15+
- Create non-linear workflows that execute steps in parallel
16+
- Define multiple branches with optional filters (every branch runs by default)
17+
- Merge and continue execution in the parent flow after the branching operation
18+
19+
<Callout type="info">
20+
The Parallel operator is a control flow **Block** with **start** and **end** phases. [Learn more about Blocks](./#blocks).
21+
</Callout>
22+
23+
## Getting Started
24+
25+
<Steps>
26+
27+
### Generate a test event
28+
29+
Add a trigger and generate an event to help you build and test your workflow:
30+
31+
![trigger.gif](./images/switch/trigger.gif)
32+
33+
### Add the Switch control flow block
34+
35+
Click the + button to add a step to the canvas and select Switch from the Control Flow section on the right. In the “start” phase, configure rules for a case.
36+
37+
![add switch.gif](./images/switch/add_switch.gif)
38+
39+
<Callout type="info">
40+
**IMPORTANT:** If you disable the **Default** condition and an event does not match any of the rules, the workflow will continue to the next step after the **Switch** section. If you want to end workflow execution if no other conditions evaluate to `true`, enable the Default condition and add a **Terminate Workflow** action.
41+
</Callout>
42+
43+
### Optionally add additional cases
44+
45+
To add additional cases, click the **+** button.
46+
47+
![add another case.gif](./images/switch/add_another_case.gif)
48+
49+
### Test and build along the execution path
50+
51+
Test the **start** phase and add a step to the branch in the execution path,
52+
53+
![test_and_build_success_path.gif](./images/switch/test_and_build_success_path.gif)
54+
55+
### Optionally merge and continue the parent flow
56+
57+
Test the **end** phase to export the results of the last step in the execution path. This makes them available to reference in the parent flow.
58+
59+
![export_data_to_parent.gif](./images/switch/export_data_to_parent.gif)
60+
61+
### Scaffold alternate paths
62+
63+
You may add steps to alternate paths and test them. Pipedream will signal that the results may not be reliable if the branch is not in the execution path.
64+
65+
![build_and_test_alternate_paths.gif](./images/switch/build_and_test_alternate_paths.gif)
66+
67+
### Validate alternate paths
68+
69+
Generate or select alternate events to trigger and validate alternate paths.
70+
71+
![test_different_trigger_events.gif](./images/switch/test_different_trigger_events.gif)
72+
73+
### Deploy and test the live workflow
74+
75+
Deploy the workflow and trigger it to inspect the executions.
76+
77+
![Inspect.gif](./images/switch/deploy_and_test.gif)
78+
79+
</Steps>

0 commit comments

Comments
 (0)