Thursday 17 March 2011

Difference between Sync and Async BPEL process -- Well explained.

This below blog contains all the essential to differentiate or understand the differences between the Sync and Asyn BPEL process.

Difference between Sync and Async BPEL process - anindyabhattacharjee

Well explained Anindya. Hats off.....

Just for quick reference and to find the differences: if you look in to the source code of the .BPEL file you will find the following respective to the to different BPEL process:

Async BPEL process will contain:  Receive and Invoke for the call back.

 <sequence name="main">
        <!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcess1_Async.wsdl) -->
        <receive name="receiveInput" partnerLink="bpelprocess1_async_client" portType="client:BPELProcess1_Async" operation="process" variable="inputVariable" createInstance="yes"/>
        <!--
          Asynchronous callback to the requester. (Note: the callback location and correlation id is transparently handled using WS-addressing.)
        -->
        <invoke name="callbackClient" partnerLink="bpelprocess1_async_client" portType="client:BPELProcess1_AsyncCallback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>

Sync BPEL process will contain: Receive and a Reply.

  <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in Sync_realSync.wsdl) -->
    <receive name="receiveInput" partnerLink="sync_realsync_client" portType="client:Sync_realSync" operation="process" variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <reply name="replyOutput" partnerLink="sync_realsync_client" portType="client:Sync_realSync" operation="process" variable="outputVariable"/>
  </sequence> 

No comments:

Post a Comment