Asynchronous vs Synchronous BPEL Processes

By M&S Consulting (Ashwin - Available in January) on Jun 7th, 2009
Filed Under Technical Tips // Tags:

Asynchronous and Synchronous BPEL processes, as their names imply, process a request in parallel or sequenctially respectively.

Asynchronous BPEL Processes

You can envision the use case of an Asynchronous BPEL Process as:

  • BPEL process A will invoke an asynchronous BPEL process B
  • After invoking BPEL process B, BPEL process A will perform operations itself while BPEL process B performs its operations
  • BPEL process A will receive a response from process B and continue on

As you can see, after invoking the asynchronous BPEL process, both process A and B continued to perform operations in parallel.

Synchronous BPEL Processes

You can envision the use case of a Synchronous BPEL Process as:

  • BPEL process A will invoke an synchronous BPEL process C
  • After invoking BPEL process B, BPEL process A must wait for BPEL Process C to complete its operations and respond before proceeding
  • BPEL process A will receive a response from process C and continue on

As you can see, once process A invoked process B, the operations in B had to be completed first, sequentially, before process A could move on.

Differences in Invoking Asynchronous vs Synchronous Processes

Create a New BPEL Project
Select Asynchronous Template’ or ‘Synchronous’ Template and Click ‘Finish’
creatingsyn

Invoke an asynchronous process

  • Create a invoke activity and associate to the partnerlink of the asynchronous flow
  • Create a receive activity and associate to the partnerlink of the asynchronous flow

Invoke a synchronous process

  • Create a receive activity and associate to the partnerlink of the synchronous flow

Screenshot: Invoke Asynchronous BPEL Process (left) and Synchronous BPEL Process (right)
invokeandreceive1

Configuring Timeout Properties for Synchronous Partnerlink

Synchronous Flows have a default timeout for 60 seconds. If you feel your synchronous flow will take more than 60 seconds to complete. You can configure timeout property in the partnerlink.

Edit synchronous bpel’s partnerlink
partnerlink

Go to the properties tab and add a new property
timeout

When Should Each Be Used?

I consider creating asynchronous processes to be a more flexible practice. From a process standpoint,invoking and then immediately receiving from asynchrounos processes provides you the same synchronicity. One use case where you might want to use synchronous BPEL processes is when you invoke the BPEL process from an external application, like a web application that requires a request-response model; asynchronous BPEL processes do not follow that structure.

Bookmark and Share

Related Information:

  1. Oracle BPEL Sensors for Real Time Event Publishing from Business Processes - A Design Perspective This article is a look at Oracle’s BPEL Sensor approach to publishing real time data and events for in flight...
  2. BPEL Database Polling - Oracle SOA 10.1.3.x in JDeveloper (Asynchronous) Polling for changes in a database has been a requirement for systems for a very long time. With Oracle BPEL,...
  3. Salesforce.com Integration - Oracle Fusion Middleware SOA and BPEL Oracle Corporation has recently published a white paper written by M&S Consulting, where we take the opportunity to outline an...
  4. BPEL Not Good For Rapid Changes I am excited about BPEL’s proliferation. But for some organizations (specifically, IT shops), BPEL is being used in areas it...
  5. Invalid Nested Schema Loading Error with Oracle BPEL, AIA/PIP I faced this issue in the context of building an Application Business Connector Service (ABCS) using AIA / PIP, so...

Leave a Reply


Archives

Recent Comments

  • Dave Bull said: At last! a tutorial which explains everything! And you make it look so easy as well :) Very well doen...
  • Paul Guidry said: Great tutotial, but at the end I had to log into apex using sys and not system. I recieved the same...
  • Unreal said: Metalink is so bad. To think Oracle is proud of this? Totally unusable.
  • Amy said: I was wondering if you implemented the google CSE on an apex application? I am trying to do this for a...
  • Sanjay J. Khachane said: Dear all, This is Code For Refresh Materialized in .NET Public Sub RefreshMView() Dim tran...

Calendar

February 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728

Featured Testimonial

"M&S has taken 'partnership' to a new level. They are not only a deeply skilled service provider, the M&S team is actually a mission critical component to our operations, taking on new initiatives as well as maintaining custom, open source, and COTS solutions."

CEO, MedPivot

Free SQL Service