As far as I know, this feature is introduced in 11g and is very useful in situations where a parent process has to control the processing of the child processes. And, vice versa, where child processes has to notify their parent process when a specific task is completed. Most of the time a signal is enough and no additional information has to be sent along. Therefore, for example, a BPEL invoke activity with correlation might be a bit too complex for this purpose.
Ok how does it work? The tutorial gives you a clear explanation how to use signaling in Oracle BPEL so I will describe the rough details about how you can use signaling and also some limitations that I discovered while praticing with this feature.
How-to
- Create a BPEL master detail proces in the composite.
- Use the process type asynchronous for the master process and the the type one-way for the detail
- Add an Invoke activity to the master process to invoke the detail process
- Open the source view of the BPEL editor and add the following property to the invoke activity:
bpelx:invokeAsDetail="true"
- Add a Wait activity to the master process for demo purposes
- Add a Signal activity to the master process
- Remember the Label value
- Set the To value to details
- Add a Receive Signal activity to the master process
- Remember the Label value
- Set the From value to details
- Add a Receive Signal activity to the detail process
- Use the Label value used in step 4
- Set the From value to master
- Add a Wait activity to the detail process for demo purposes
- Add a Signal activity to the detail process
- Use the Label value used in step 5
- Set the To value to master
- You're done! Deploy the composite to the server and test your composite.
Unfortunately, the coordination functionality has some limitations:
- Labels can not be set dynamically using XPath
- Correlation labels can not be set dynamically using XPath
- Only a single signal pair (signal/receive signal) can be used for a unique label
Oh..I still have to figure out how signaling is implemented 'under the hood'.. However, happy signaling...
No comments:
Post a Comment