Friday, 13 March 2015

Synchronous BPEL Process with Wait activity getting failed with timeout Exception

Hi Guys, after a long gap again I got the time to focus on my blog.Today we are going to discuss about Wait Activity in Synchronous BPEL Process.

Recently I have implemented synchronous BPEL Process with a Wait Activity which is getting failed with some synchronous time out exception.I did the R & D on the same and finally I came to know that wait activity does not work properly in Synchronous BPEL Process.The same scenario works fine with Asynchronous BPEL Process.

Here are the rules specified in Oracle support document 1507094.
  • Wait times cannot be guaranteed if they are scheduled with other events that require processing. Due to this additional processing, the actual wait time can be greater than the wait time specified in the BPEL process.
  • Wait times of less than two seconds are ignored by the server. Wait times above two seconds, but less than one minute, may not get executed in the exact, specified time. However, wait times in minutes do execute in the specified time.
  • The default value of 2 seconds for wait times is specified with the MinBPELWait property in the System MBean Browser of Oracle Enterprise Manager Fusion Middleware Control Console. You can set this property to any value and the wait delay is bypassed for any waits less than MinBPELWait.
This document states that the Wait activity works well with an asynchronous BPEL process but not with a synchronous BPEL process where a transaction is required. The Wait activity involves a dehydration. Dehydration will persist the process and continue the process in a new thread. When the BPEL process is transaction required, the persist will not be complete until the BPEL process completes and transaction commits.


Finally I realized that the transaction behavior  needs to be changed and below are the two solutions to acheive the same.

  1. Removed the below property from the BPEL component. 
                 " <property name="bpel.config.transaction" type="xs:string" many="false">required</property> "

     2. change the same property as requiredNew.

Now I deployed and tested the code it was working fine.

Hope it helpful...!!Dont forget to drop the comments, that will helpful for my future post



1 comment: