Skip to main content

Internal Actions and Alternative Outcomes

Not every flow step sends data to another element. Some work happens inside a single element, and an expected path may end in an alternative outcome. Add both cases to the checkout flow.

Full lesson walkthrough in the selected color theme.

Action Within an Element​

The flow already contains cart validation and parallel order preparation. The order subsystem performs the next step internally, so no relationship to another participant is required.

Structural relationships retain durable names such as Interacts through REST API. Specific actions—reserving inventory, calculating delivery, or submitting a cart—belong to the flow. This separation keeps structural dependencies stable while the flow explains behavior in a particular scenario.

Loading image...
Parallel preparation is complete and the flow is ready for the next stage

Add an Action Within an Element step, select the performer, and name the operation. In this example, the subsystem creates the order and calculates its total.

Loading image...
An internal action belongs to one element and requires no relationship

After saving, the dynamic diagram shows a self-call. This distinguishes internal processing from interactions between subsystems.

Loading image...
A self-call represents an operation performed inside the subsystem

Alternative Sequence​

Select the internal action, add a new top-level step, and choose Alternative Sequence. The selected action becomes the point after which the main scenario may take a different path.

Create an alternative outcome for the selected step.

Enter the condition that selects the alternative branch. It should briefly explain why the main path cannot continue.

Loading image...
The source step is selected automatically; only the condition remains to be described

After saving, an empty branch appears below the main sequence. Its internal add button creates steps only within that outcome.

Loading image...
The alternative outcome is separated from the main sequence

Error Handling​

Add another internal action to the nested branch. Select the order subsystem and describe how it records an order-creation failure.

Loading image...
The nested action runs only for the alternative outcome

The main path now describes successful order creation, while the separate branch records a failure. The scenario remains readable and suitable for later analysis.

Loading image...
Successful and failed outcomes are captured in one flow model

Local Visibility of an Alternative​

The eye icon beside an alternative sequence temporarily hides it from the diagram. This keeps the main path in focus for a presentation or export without deleting any model steps.

Loading image...
The main scenario remains in focus while the alternative data is preserved

Select the icon again to restore the branch. This preference is local to the current user, so every participant can choose a suitable level of detail.

Loading image...
The hidden branch is restored without losing any actions

Chapters​

  • 00:00 — purpose of internal actions and alternatives;
  • 00:05 — adding a step;
  • 00:13 — selecting the performer;
  • 00:21 — saving with a shortcut;
  • 00:27 — separating structure from behavior;
  • 00:43 — selecting the source step;
  • 00:46 — adding an alternative;
  • 00:53 — alternative condition;
  • 01:01 — separate branch;
  • 01:09 — error-handling action;
  • 01:17 — selecting the performer;
  • 01:29 — saving the branch;
  • 01:36 — hiding the alternative locally;
  • 01:51 — lesson result.

Next lesson: OpenAPI Import and Safe Updates.

Previous lesson: Parallel Order Preparation.