Skip to main content

BPMN control-flow patterns

A token marks a point a process can continue from. These teaching simulations show one process instance and one step per action. Filled circles indicate tokens once you start a simulation. The diagrams and descriptions also explain each example on their own.

The start activates Review. Once the reviewer finishes, the token moves to Approve. Completion of Approve leads to the end event.

SequenceA start event leads to Review, then Approve, and finally the end event.StartReviewApproveEnd
A start event leads to Review, then Approve, and finally the end event. Scroll to see the full diagram.

A sequence flow connects the activities in a defined order.

The first exclusive gateway selects either full review or summary review. The merge forwards the one arriving token to the end. Try both routes and compare which task becomes active. A deployed Getriebe model selects the branch by condition and default rules. The buttons stand for the results of those rules.

Exclusive split and simple mergeThe exclusive split selects Review full document or Review summary. The exclusive merge forwards whichever token arrives.StartChoiceReview full documentReview summaryMergeEnd
The exclusive split selects Review full document or Review summary. The exclusive merge forwards whichever token arrives. Scroll to see the full diagram.

See exclusive routing and the modelling example.

The split activates Check references and File document together. After either task finishes, its token waits on its incoming flow to the join. The other branch can still run. When both arrivals are present, the join passes one token to the end.

Parallel split and joinStart enters a parallel split. Check references and File document lead to a parallel join and then the end.StartSplitCheck referencesFile documentJoinEnd
Start enters a parallel split. Check references and File document lead to a parallel join and then the end. Scroll to see the full diagram.

See the parallel routing contract and the modelling example.

The merge before Review accepts the first entry or the loopback. After each review, the decision either sends the token back for another iteration or forwards it to the end. Repeat twice, then leave the loop. The simulation represents a graph loop with a single entry and regular exit, with a manual choice standing in for the route condition.

Structured loopStart and the loopback join at the merge before Review. The exclusive decision after Review either loops back or exits.StartEntryReviewDecisionEndRepeatExit
Start and the loopback join at the merge before Review. The exclusive decision after Review either loops back or exits. Scroll to see the full diagram.

See the iteration contract.

Review round starts Check budget and Check purchasing in parallel. Each task leads to its own None End Event. That event consumes the token of its path. The other path can still have work. The enclosing process activates Review result once the Sub-Process has no remaining work.

Implicit termination of an embedded Sub-ProcessBudget and purchasing run in parallel inside Review round. Each branch ends at its own End Event. Review result becomes active once both branches finish.Review roundStartCheck budgetCheck purchasingReview resultEnd
Budget and purchasing run in parallel inside Review round. Each branch ends at its own End Event. Review result becomes active once both branches finish. Scroll to see the full diagram.

Try either completion order. After the first task, the remaining task is still inside the Sub-Process. After the second task, the single token for Review result is outside it. The revised 2006 pattern catalogue calls termination upon exhaustion of work Implicit Termination. Getriebe requires explicit None End Events on the individual paths. Workflow Control-Flow Patterns, WCP-11.

Download the BPMN model, or see the execution evidence for the same behavior through the Effect server.

Multiple Instances with a priori Run-Time Knowledge (WCP-14)

Section titled “Multiple Instances with a priori Run-Time Knowledge (WCP-14)”

An order supplies its required review kinds. The same Review order activity creates two or three tasks when it starts. Each task can complete independently, then all meet at the activity’s outgoing flow. See the revised 2006 Workflow Control-Flow Patterns, §3.3.4.

One activity creates a task for each input item. The decision waits for every vote.
Input orderCompletion orderPublished votesNext task
Budget, PurchasingPurchasing approves, then Budget approves[true, true]Confirm order
Budget, Purchasing, ComplianceCompliance approves, Budget approves, then Purchasing rejects[true, false, true]Revise order

The simulation shows the relationship between input order, completion order and the next step. The modeling guide has a runnable BPMN file. Execution evidence covers concurrent completion and restart.

The separate order deadline tutorial illustrates the Cancel Activity pattern from Russell and colleagues’ revised 2006 catalogue. The deadline is an interrupting BPMN Boundary Timer attached to Review order. The two outcomes consume the same waiting activation. Workflow Control-Flow Patterns, §3.3.6.

Interrupting deadline on an order reviewA timer is attached to Review order. Completion follows the upper path. If the timer fires first, it withdraws Review order and activates Senior review on the lower path.StartReview orderWithdrawnDeadlineCompletedSenior reviewOn completionOn timeout
A timer is attached to Review order. Completion follows the upper path. If the timer fires first, it withdraws Review order and activates Senior review on the lower path. Scroll to see the full diagram.

First event processedResult
The reviewer completes the taskReview order completes and the regular path continues.
The timer fires at or after the deadlineReview order is withdrawn. The timeout path activates Senior review.

The buttons represent processing order. For a live clock, task history and restart, use the order deadline tutorial.

The Await order confirmation Sub-Process is the region. A 30-second non-interrupting Boundary Timer on Confirm order starts the reminder path while the task stays open. The 1 min deadline on the Sub-Process withdraws outstanding work inside the region and opens Senior sign-off outside it. The revised workflow patterns catalogue describes this as Cancel Region. Workflow Control-Flow Patterns, WCP-25.

Cancel Region in the order confirmation Sub-ProcessA non-interrupting timer on Confirm order opens the reminder path while the task stays open. Regular confirmation terminates work inside the scope. The attached deadline withdraws the scope and opens Senior sign-off outside it.Await order confirmationStartConfirm orderWithdrawnTerminate30 s reminderSend reminderWithdrawn1 min deadlineSenior sign-offOrder approved
A non-interrupting timer on Confirm order opens the reminder path while the task stays open. Regular confirmation terminates work inside the scope. The attached deadline withdraws the scope and opens Senior sign-off outside it. Scroll to see the full diagram.

Try early confirmation, an overdue deadline, and escalation while the reminder is running. Dashed outlines mark withdrawn work. The simulation advances on each button press. The modeling guide runs the same scope in the Effect server.

This example intentionally connects an exclusive split to a parallel join. Only one review receives a token. Whichever path you complete, the join is still waiting for the other input. The end remains unreachable along this run.

Blocked parallel join after an exclusive splitThe exclusive split selects one review. The parallel join requires arrivals from both reviews, so the selected branch cannot reach the end.StartChoiceReview full documentReview summaryJoinEnd
The exclusive split selects one review. The parallel join requires arrivals from both reviews, so the selected branch cannot reach the end. Scroll to see the full diagram.

Open the blocked model in the Modeler and choose Validate. The structural report identifies the two gateways as unmatched-gateway and blocks deployment. That check runs before behavioural analysis. See how to read a model report.

A Service Task can read a typed process field and map its result to another field. In the modelling tutorial, Check amount receives the exact decimal string "125.50" and its registered handler returns the Boolean true for eligible.

Typed data and a Service TaskThe Check amount Service Task passes the decimal amount to a handler and maps its Boolean result back to process data.amount “125.50”Check amounteligible true
The Check amount Service Task passes the decimal amount to a handler and maps its Boolean result back to process data. Scroll to see the full diagram.

The service work contract explains when the engine accepts a result.