nonBlockingInvoke
By default, Oracle BPEL Process Manager executes in a single thread, executing the branches sequentially instead of in parallel. When this property is set to True, the process manager creates a new thread to perform each branch's invoke activity in parallel. This property is applicable to both durable and transient processes.
Consider setting this property to True if you have invoke activities in multiple flow or flow n branches. This is especially effective if the parallel invoke activities are two-way, but some benefits can be realized for parallel one-way invokes as well.
Values:
This property has the following values:
*
True: Oracle BPEL Server spawns a new thread to execute the invocation.
*
False (default): Oracle BPEL Server executes the invoke activity in the single process thread.
In this exercise we will try to find out practically what does it mean.
I have created a simple BPEL process with a flow activity with two sequence.
In both the sequence i am using an assign activity and a invoke activity.
In one of the sequence i am using wait activity which has a dealy of 5 second.
Both the sequence are invoking a single asynchronous bpel proess so in all my
process looks something like this.
As per Oracle documentation
Now as per the documentation the two branches should execute sequentially because non blocking invoke is set to false by default.So i executed this process with some random input and i got the following time duration sheet for the process.
I couldn't notice the behavior that is expected ,if as per documentation
the sequence should be processed in a sequence but here as you can see in the flow timing both the flow has started at almost similar time then there is a once second dealy on calling the next invoke that is the only thing which i can see in the flow which points me that it first waited for first sequence to complete.However we will go ahead and set the nonblockinginvoke to true and see the result how does it behave
I redeployed the process and i didn't get much difference the only difference is a second delay which i believe is due to property that we have set.
Here as you can see the two assign are at same time so this might have caused because now we have allowed parallel processing and both the sequence are working concurrently.Here we have seen scenario where in there was a change of 1 second but we can use this scenario in many case where in even a delay of second will be crucial.May be i will come up with some better example to illustarte this,The whole idea was to give you an idea on this property.
Few things that we need to take care is that we should use this property when we are making a call to asynchronous service,we can use it for synchronous process also but that is not a good design process as synch process are supposed to complete in fraction of seconds,so it won't make much sense if you have two sequence with call to synchronous process.Bottom line its all about how you desing your process.
No comments:
Post a Comment