Synchronous versus asynchronous processes
The synchronous BPEL default template contains the initial Receive activity and final Reply activity. We can add more activities between Receive and Reply based on the business process and logic. A typical BPEL requires more activities to process the business logic in addition to Receive and Reply activities.
Use synchronous BPEL processes if the BPEL process requires a request-response model.
Asynchronous services are a call-and-forget service.
The response may not return for an asynchronous service. The client can immediately perform other processing work after making an asynchronous service call and doesn’t need to anticipate a response immediately.
An update on a database is an example of a synchronous process. BPEL waits until it completes the database update activity and then replies and completes the process. An example of an asynchronous process can be, getting a credit score from a credit agency system.
The asynchronous BPEL provides information about a person to the credit agency and drops the operation. The asynchronous process continues to do processing and it determines when to accept the data from the credit agency.
For asynchronous processes, there is no need to wait for a response before proceeding to the next step. The response can be received as part of a separate process.
While creating a BPEL process in JDeveloper, we select either the Synchronous BPEL Process or Asynchronous BPEL Process template based on the design of business process and logic.

Oracle BPEL Process Manager uses the WS-Addressing technique for message correlation between the sender and receiver.
In order to correlate the response messages, Oracle BPEL Process Manager simply adds Unique Identifier (UID) in the WS-Addressing headers on the initial request that floats with the simple object access protocol (SOAP) packets.

BPEL correlation
Correlation is a process that matches incoming messages to a particular BPEL process instance.
Synchronous BPEL does not require correlation.
Correlation is only required for asynchronous BPEL processes.
Oracle BPEL Process Manager automatically establishes correlation using WS-Addressing.
Oracle BPEL Processor Manager has the following two methods for correlating asynchronous callback messages to the calling instance.
• WS-Addressing
• Correlation sets
One needs to write a manual correlation for the following scenarios:
• Calling service does not support WS-Addressing.
• When the asynchronous call has multiple layers.
For example, Service A calls B, B calls C, and C Calls D. Response comes from D to A (instead of D to C to B to A). Another option in this scenario is to manipulate the replyTo header without implementing custom correlation.
Resume :

Laisser un commentaire