Flow Control

Activity diagrams support various flow control structures to model complex workflows, including conditionals, loops, switches, and parallel processing.

Conditionals (if/then/else)

Use if, then, else, and endif keywords to add conditional logic to your diagrams.

Activity Diagram Example
Loading...
Conditionals Example

Multiple Conditions (elseif)

Use elseif to handle multiple conditions.

Activity Diagram Example
Loading...
Elseif Example

Switch and Case

Use switch, case, and endswitch to handle multiple alternative paths based on a value.

Activity Diagram Example
Loading...
Switch and Case Example

Repeat Loops

Use repeat and repeat while to create loops that execute until a condition is met.

Activity Diagram Example
Loading...
Repeat Loops Example

Backward Actions

Use backward to add an action in the return path of a loop.

Activity Diagram Example
Loading...
Backward Action Example

While Loops

Use while and endwhile to create loops that execute while a condition is true.

Activity Diagram Example
Loading...
While Loops Example

Parallel Processing

Use fork, fork again, and end fork or end merge to represent parallel execution paths.

Activity Diagram Example
Loading...
Parallel Processing Example

Split Processing

Use split, split again, and end split to create multiple alternative paths.

Activity Diagram Example
Loading...
Split Processing Example

Kill and Detach

Use kill or detach to terminate a branch without merging.

Activity Diagram Example
Loading...
Kill and Detach Example