Monday, March 08, 2010

Synchronous BPEL process in SOA Suite

We will try to understand the concept of bpel process manager as how a asynchronous and a synchronous bpel process work in SOA suite.

Consider a simple synchronous BPEL process.



This is a simple bpel process where in i am assigning the input variable to the output variable.

Just look at the last activity in the bpel process it is a reply activity which means the called is expecting a reply from the process.This activity in the last step shows that the process is a synchronous bpel process ,we will check later what appears in an asynchronous BPEL process.

Synchronous BPEL process is used in case where in you are expecting an immediate result in fraction of second or more specifically in milliseconds.More often we found that ppl implement their project using synchronous process and increase its syncMaxWaitime to very high value it is not a gud programming appraoch, a synchronous bpel process should be used only in case where reply comes in milli seconds.


Now we will try to understand how the flow works in synchronous process.

Once you provide an input to this BPEL process following thing happens in background

1>Client start a thread and provides the input data.

2>The j2ee container takes this thread and start a JTA transaction.

3>The flow enters to the BPEL engine where in it passes the value to receive activity.

4>Next it assign the input variable to the output variable.

5>It do a callback.

6>The BPEL process manager tries to get the connection pool and dehyudrates the data in to the database.

All these occurs in a single thread and in a single transaction.This is because there was no mid-point activities in between ,had there been some mid point activities in between the scenario wud have been different.

No comments: