BPEL in SCA assembly model
(For basics about SCA visit:
SCA and BPEL are complementary technologies. Though both have a mechanism to capture relationship between services, both do it differently. Moreover, BPEL is an execution language while SCA captures only the dependencies.
BPEL process can be an implementation type of service(s) within SCA. One may define service using BPEL and deploy the composite.
BPEL capture relationship between a process and an interactive web service as a partnerlink with different roles tied to port types. SCA maps the partnerlink with a single role (port type) to a reference. Thus, mapping between SCA and BPEL is straightforward.
Let us assemble a composite containing a BPEL process. I am using a stripped down version of a PurchaseOrderProcess given in proposed WS-BPEL 2.0 specifications. This process invokes two other services one to compute price and another to ship the product. These relationships are captured in three partnerlinks.
In case of WS-BPEL, a partnerLink defines two roles, one for the WS-BPEL process and one for the partner. In SCA, Depending upon a message flow direction, one of them becomes a reference and another becomes a service.
In our example, the BPEL process’s interface is exposed as a service entry point of the composite while other partner links are mapped as references.
Invoice (computePrice) service and Shipping service can be local or external to the composite. I am making both of them as external webservices. Thus, our composite looks like:
You may notice, wires between component and references. The BPEL process does not know what kind of implementation those references and what kind of binding it has. This loose coupling and flexibility is a power of SCA architecture.
Finally, here is the SCA composite representation for this assembly.
Disclaimer: The specs are still being evolved and may change. The representation is simplified for explanation hence it is not complete.
1. WS-BPEL 2.0 : http://docs.oasis-open.org/wsbpel/
2. SCA whitepaper: http://www.osoa.org/display/Main/SCA+BPEL+White+Paper
3. SCA - BPEL specs: http://www.osoa.org/download/attachments/35/SCA_ClientAndImplementationModelforBPEL_v0.95.pdf?version=2