Pareller But Sequential using Flow activity :)
When we need to build a composite bpel service where we need to invoke several services in parallel for performance reasons we need to use Flow activity. Branches in flow, flowN, and forEach activities are executed serially in a single thread (that is, the Nth branch is executed only after N-1 execution has completed). Execution is not completely parallel. This is because the branches do not execute in concurrent threads in this mode. Instead, one thread starts executing a flow branch until it reaches a blocking activity (for example, an synchronous invoke). At this point, a new thread is created that starts executing the other branch, and the process continues. This creates the impression that the flow branches are executing in parallel. In this mode, however, if the flow branches do not define a blocking activity, the branches still execute serially.
Parellel and Purely Parrelel using Flow:
First, you should go ahead and implement your flow with as many branches as required each with a service invocation. You should then have a process that looks similar to the one below.
To execute these invocations in parallel, double click on each partner link on the right side of the BPEL process. Go to Properties and add a new property. Select nonBlockingInvoke from the list and set the value to true.
Below link has an example for combination of Invoking Asynchronus webservice in parellel way by using Flow and Pick activity.
http://sathyam-soa.blogspot.in/2013/10/learner-series-oracle-bpel-receive-pick.html
http://sathyam-soa.blogspot.in/2013/10/learner-series-oracle-bpel-receive-pick.html
No comments:
Post a Comment