Friday, June 27, 2014

In my previous post, I discussed about first use case for pick activity (When we call asynchronous service and we need response back in certain time frame otherwise we need to throw exception).
In this post, I will discuss about second scenario and show one use case of that.

In this scenario, we will have more than one entry point to same composite i.e. same composite can be invoked either by web service call or through JMS queue.

For this post, you need to add two services in the composite, one for web service and other for JMS Queue.

Add a BPEL process to the composite and wire both the services to the BPEL.

Now open BPEL process and drop Pick activity to it. Since we have two entry points for this composite so add one more OnMessage branch to it.

Make sure you select “Create Instance” box for that pick activity so that it can create BPEL instance, if you don’t check this option then you will not be able to compile your code.

Now go to first OnMessage branch and add partner link reference.

Do same steps for second OnMessage branch.

Once done, add required activities in both the branches. If you don’t add any activity inside any of the branch then you will not be able to compile your code.
Now deploy your composite.

Testing Result:

Let’s first test by web service call, go to EM console and test the composite. To test second entry point put message to JMS queue.

By Vivek Garg - 6/27/2014

Please do not copy content of this post to your blog.


Post a Comment