Interaction Pattern – Synchronous Transactions in SOA 12c

The blog discuss about ” How to invoke  Synchronous Transactions using SOA Suite Integration Pattern in SOA 12c” , “How to invoke Asynchronous Process from the  Synchronous Transactions in SOA12c”

Synchronous Transaction Integration Pattern

The synchronous integration pattern is the one where the application sends the message from the Client and receives the response back or we can say that its a 2 way communication process which is a combination of request and response.
The BPEL Process Service Component can be a Client who sends the request to the service and receives the response back or it could be the service who accepts the request and returns the response to the Client.

Synchronous Transaction Example in SOA 12c

Consider an example for synchronous transaction in SOA Composite application where user clicks on the application to get the list of employee in a particular department. In this scenario, the Department No. is the input from the Client and list of Employee will be the response sent back by the called service.

Integration pattern: Synchronous Transactions

If the synchronous transaction uses BPEL Process as the Client, it needs to have the Invoke Activity. The port on the client side is used to send the request data to the Target Service and to receive the response (using the Reply Activity). The WSDL in the Client side BPEL Process Services defines the interaction depicting the portType, operation.

If the synchronous transaction uses BPEL Process as the Service, it needs to have the Receive Activity. The Service will execute the data as per the received request and returns either the Response or the Fault Message in case of any error occurred while processing the data. The WSDL in the Service side BPEL Process Services defines the interaction depicting the details including the fault defined.

Synchronous Transaction Invoking the Asynchronous Process:

If the synchronous transaction using the BPEL Process invokes an Asynchronous Process, then it will not have processed successfully as the callback response message is not acknowledge by the synchronous BPEL Process ad it will be timed out.

Sample for the portType and operation of the BPEL Process WSDL. The WSDL Operation supports both the Input and output messages for synchronous transaction processing.

<wsdl:portType name="SyncBPELProcess1">
<wsdl:operation name="process">
<wsdl:input message="client: SyncBPELProcess1RequestMessage" />
<wsdl:output message="client: SyncBPELProcess1ResponseMessage"/>