Example: Pattern 01: Factor Composition Logic Away from Process Logic
Achieve separation of concerns between BPEL for overall process flow execution and BPEL for realizing operations within composite services.
Relationships
Main Description

In this example, we see the Activity diagram for a service operation, processPurchaseOrder, which is the entry point for a Purchase Order Process business process (see Concept: Service Composition and Choreography for more details of this example) .  The BPEL for this method -- which is, in essence, the BPEL for the process flow -- either can be manually coded or generated from the Activity using appropriate tooling.  The BPEL then could be used in a choreography tool to implement a long-running or short-running BPEL process.  

The processPurchaseOrder operation is realized using three services, which are responsible for invoicing, shipping, and scheduling.  The current Activity calls various operations on those services, but it has no knowledge of how the services are realized.  Those details are deferred to behaviors which are owned by the Participants that provide the services.  Similarly, the BPEL that would be created to support the Purchase Order Process has no knowledge of how, for example, the initiatePriceCalculation operation of the invoicing service is realized.  Those details would be captured in BPEL that maps to any owned behavior of the invoicing Participant that describes the implementation of initiatePriceCalculation.

This process of creating BPEL that describes current-level choreography of process flow and called actions, and then dropping down a level of detail to create separate BPEL artifacts to describe the details of how the actions are realized, is continued through any hierarchy of composite services that is used to realize a business process.  In this way, we maintain separation between process flow logic and compositional logic.

  

More Information