The naïve approach to process design is to build a process as a single large graph that models control flow. Although the naïve approach is the most natural, it produces complex graphs, which become almost unreadable and are difficult to maintain for use cases with a large number of number of scenarios.
The State form begins by deciding the main entity that the process is acting upon. It then builds a state machine model for that entity and restructures the process as a state machine. In BPEL, the machine is driven by a while
loop; the loop contains a switch
with cases
to handle each state. The logic of each state includes a pick
to drive transitions. A state with child states uses an inner switch
to select the current child state.
The Event form structures the process as a while
loop containing a pick
with handlers for each possible event. Filters are used to prevent events from occurring at the wrong time. Some states (a handful of process flags) are needed for conditional...