Parallel Order Preparation
Once the cart has been validated, several operations can run independently. In this lesson, reserve inventory and calculate delivery terms in parallel.
When to Use a Parallel Block
The flow already contains the cart-validation command and its response. The next operations do not depend on one another, so they should not be modeled as a strict sequence.
Add a step and select Parallel Execution. Enter a description that explains the shared purpose of the grouped actions.
After saving, an empty block appears in the list. Its internal + button adds
steps to the nested sequence rather than to the main flow.
First Branch
In the first branch, Order management subsystem calls Inventory management system. Create the Reserves inventory command and select its initiator and
target. The Interacts through REST API relationship is selected automatically.
The structural relationship deliberately retains a durable name because it
represents a lasting dependency. The specific action Reserves inventory
belongs to this scenario and is therefore recorded in the flow. The arrow points
from the order subsystem to inventory because the initiator knows the dependency;
the response does not create a reverse structural relationship.
Add the response. The reverse direction appears on the diagram, and the block list shows a complete pair of actions.
Second Branch
Using the same pattern, create Calculates delivery from Order management subsystem to Delivery management system, followed by Delivery parameters received. Keyboard shortcuts make repeated operations faster: 1 selects an
interaction, 2 a command, 3 a response, and Ctrl + Enter or ⌘ + Enter
saves the form.
The completed block contains two independent pairs. They belong to the same flow stage but impose no ordering between one another.
Validate with Playback
Start playback and move to the parallel stage. The player presents the actions inside the block one by one while preserving their shared parallel grouping.
Continue playback to verify the second branch and the direction of its response.
Chapters
00:00— parallel processing;00:05— adding a step;00:07— selecting the block type;00:15— empty parallel block;00:19— first branch;00:53— first response;01:09— first branch completed;01:12— speeding up repeated actions;01:16— second branch;01:44— second response;02:05— completed block;02:11— flow menu;02:22— starting the scenario;02:27— playing the first branch;02:32— playing the second branch;02:36— stopping playback;02:41— lesson result.
Previous lesson: First Data-Flow Steps.
Next lesson: Internal Actions and Alternative Outcomes.