Name

State-Based Patterns

Synopsis

State-based patterns apply to processes that are largely event-driven and spend most of the time waiting for an event to trigger the next activity. There are three state-based patterns: Deferred Choice, Interleaved Parallel Routing, and Milestone.

Deferred Choice

The intent of Deferred Choice is similar to the basic Exclusive Choice pattern, in that a decision is made to follow one of multiple paths, except the decision is not made immediately but is instead deferred until an event occurs. This pattern is also known as Event Choice and Pick.

Processes that are event-driven are likely to use this pattern. A very common scenario is to wait for either a positive or negative result to a request. The process, shown in Figure 4-21, is fairly common.

In this example, the process is waiting for either an acceptance or rejection result to an earlier request. Each event leads to a distinct execution path: acceptance means sending a welcome package; rejection means sending a rejection letter.

Though some older vendors lack support for deferred choice, as the P4 point out, most contemporary languages have explicit control structures for it. BPEL uses a pick activity to listen for exactly

The Deferred Choice pattern for acceptance or rejection
Figure 4-21. The Deferred Choice pattern for acceptance or rejection

one of several inbound service events. BPMN has a special exclusive OR gateway (the diamond with a star in the middle ...

Get Essential Business Process Modeling now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.