Synchronous Process:
The synchronous process defines one two way operation port to receive the request and send the response. Using the invoke
activity the client invokes the Synchronous BPEL process on this port
and waits to receive the response on the same port. As soon as the
client receives the response from the BPEL process it continues with its
flow. On the BPEL process side, the Synchronous BPEL process gets
instantiated on receiving the client request and sends back the reply
using the reply activity on the same port on which the Client is waiting.
Asynchronous Process:
In the asynchronous process two one way operations ports are defined to receive the request and send the response. On the client side, the client uses the invoke
activity to invoke the asynchronous BPEL process and continues with its
flow. It uses the receive activity to receive the response later in the
flow. The asynchronous BPEL process receives the request on one of the
ports and sends back the reply from another port (callback port). To
send the response the asynchronous BPEL process invokes the client on
the callback port using the callback activity.
A synchronous process is invoked, the operations of this process has to be completed first and only then the client is able to resume its operations .
While in the case of asynchronous both the process continues to perform their operations.
Below image showing a call to asynchronous and synchronous process.
Note:* A port is nothing but a method with input and output. So a two way operation port has an input and an output while a one way operation port has only input or output.

No comments:
Post a Comment