Modeling Event-Driven Processes

Very few BPMSs support business state machines natively in their design tools. In Vitria BusinessWare, it's actually the default. In IBM WebSphere BPM Suite, it's provided as an alternative design tool in addition to their conventional BPEL editor, although it has no corresponding modeling tool in WebSphere Business Modeler. The interesting thing about the IBM implementation is that the business state machine is expressed as BPEL. I always wondered how that was done, but an article on DeveloperWorks provides the clue, which was subsequently verified to me by Matthias Kloppmann, one of the architects of WebSphere BPMS.

States are represented in BPEL as variables. Each state can have predefined exit and entry actions. Between the start state and the end state the BPEL is a While loop containing a giant Pick, with a separate Pick branch for each event in the state diagram. Each branch performs the following sequence of steps:

  1. Validate the event for the current state
  2. Evaluate the condition if any
  3. If transition to a new state, perform the exit action of the old state
  4. Perform the transition action specified in the state diagram
  5. Perform the entry action of the new state
  6. Update the state variable
For any arbitrary state diagram this works in BPEL without violating the rules. If you viewed the BPEL in a normal BPEL editor it would be much less clear what is going on in the process. It's much clearer in the state diagram.

It seems to me event-driven processes are not too complicated for process analysts, and would benefit from a business-oriented modeling tool. (Actually IBM's business state machine editor doesn't seem too complicated, but it's buried inside a tool that probably is.) BSMs and conventional activity flows can even be combined in an overall process description. Screenflows defining a single "user task" come to mind, for example. For now the BPMN world probably has higher priorities than this, but extending modeling to event-driven processes or process fragments seems like a good idea.