The second way to flatten the disputes process is to structure it as an event loop. The following subsections tell us more about how to do this.
The BPEL implementation of the event form consists of a while
loop containing a pick
with a handler for each possible event type. The control flow logic of the original requirements definition is subsumed into the handling of events. The while loop continues until an event is encountered that brings the dispute to a state of completion.
The following figure depicts the disputes process in flat event form:
The events are shaded, and the numbering traces through the crediting scenario. The sequence of events in the scenario is: Receive Submit (Cust), OnMessage RequestDocs (Ops), OnMessage Update (Cust), OnMessage Captured (Ops), OnMessage ChargedBack (Ops)
, and OnMessage Credited (Net)
.
The most significant features of this implementation are as follows...