Saturday, April 27, 2013

Inter Process Communication with Events, Signals and Correlations

(JDeveloper 11.1.1.7, WLS 10.3.6, SOA/BPM 11.1.1.7)

Following is a simple Application to demonstrate how to Communicate between running process instances in Oracle BPM, using Events, Signals and Correlation

Create a BPM Application with an Asynchronous process



Define a Business Object and payload as shown below




Modify the Business Object and add attributes as follows


Add another Business object as follows for identifying the instance of the process we want to send a signal.


Create a process data object with the object type ‘ESCObject’ and make sure it is Auto Intialized.



Open the Start activity properties and create Data mappings as follows and associate the Start activity payload to the process payload.



Open the Start activity Correlations property and Add a correlation key as shown below.



Make sure the correlation has ‘Initiates’ as shown below



Drop a User activity after the Start and associate the data mappings as shown below.



Create a new Event as shown below



Drop an Event Sub process in the ESC Process and set the implementation type for the Start as Signal and associate data mappings as shown below.



Define Correlations as shown below. Make sure the Mode is ‘Uses’.



Add an Update activity in the event sub process as follows.



Make sure Auto Initialize is not checked for the payload in the Event Sub process



Create another process in the process to throw the Signals for Stopping the process



Add a throw event after the Signal Start in the process as follows and associate data mappings.



Make sure Auto Initialize is not checked for the process data object in the Terminate Process



Testing

Login to the EM Console and click on the Composite



Enter data as follows for testing and click on ‘Test Web Service’



The process now waits at the human task for the user to respond.



You can also see it in the BPM Workspace



Select to test the other process to terminate the first process instance



Enter the correlation key data for the process instance and click Test Web Service



The process is now terminated and the user task in the BPM Workspace is Withdrawn




















1 comment: