Tuesday, January 15, 2013

Calling Async BPEL process from BPM

BPM can call Async BPEL processes. To achieve this feature BPM uses the send and receive activities

Here is a sample BPM process which calls an Async BPEL Process

The BPM process does hotel room reservation. It has three roles.
1) The assistant who is making a request for room reservation
2) The manager who approves assistant's request
3) The receptionist who finally confirms the reservation

Please refer my previous blog on how to create a sample BPM processs


Here is the sample BPM process which does the reservation job



Now lets create a Async BPEL Process which takes a string value as input and sends the string "VERIFIED" as output


 Deploy this BPEL process

Now add the send and receive activity to the flow in the manager's swim line as shown below


 We can see the warning signs on the Send and Receive activities now. To remove the warnings we need to configure the parameters for these activities.

Go to the composite.xml of the BPM project and add a webservice resource using the wsdl of the deployed Async BPEL process


 Now click on the Send Activity and configure the service details as follows

Similarly configure the call back operation for the receive activity


Now the warnings on the Send and Receive activity will be disappeared

Now deploy the BPM Project and logon to the BPM workspace.

The deployed process will be visible in the application list


Click on the link , and initiate the process by submitting a booking request


Now open the em console and we can see an instance of the BPEL process got created for the VerificationAsync Process

 After some delay now the Approval Request will appear in the task list. The call to BPEL for verification is completed before the approval task is created.


Now Approve the request and the flow will move to confirm reservation, which will be done by the receptionist

1 comment: