Transaction strategies in WebSphere Process Server Microflows

Transactional and non-transactional services

A service call is said to participate in the navigation (process) transaction, if the service call commits (or rolls back) when the navigation transaction commits (or rolls back). We are then talking about a transactional service. A service with a transaction behavior that is independent of the navigation transaction’s outcome is a non-transactional service.

Whether a service is transactional or not depends on:

  •  Transaction management during the service call
  •  Interaction style of the service call.

Transaction management during the service call

The transaction management of the service call is determined by SCA quality of service qualifiers that are set for the process interface and the reference of service to be invoked. These qualifiers are:

  • Suspend transaction: Suspend transaction is a qualifier on the reference of the process component. It defines whether the calling component is disposed to share the transaction context with the called service.
  • Asynchronous invocation: Asynchronous invocation is a qualifier on the reference of the process component. It determines if an asynchronous invocation should occur as part of the client transaction or not.
  • Join transaction: Join transaction is an interface qualifier of the service to be invoked. It states whether the called service is willing to share its transaction with the calling component.

Interaction style of the service call

The interaction style can be either synchronous or asynchronous. A service call from a microflow is typically synchronous. The only exception is a service with a one-way interface that is declared to be called asynchronously.

Transactional services

A service is transactional in the following two constellations:

  • The service is called synchronously, and the process component and the service component express to share the transaction, for example, the reference qualifier suspend transaction of the process is set to false and the interface qualifier join transaction of the service is set to true. The transaction boundary for this case is illustrated in following Figure.

                                      Synchronous service joining the transaction of the microflow

  • The service is called asynchronously and the actual service call happens upon commit of the microflow’s transaction; the service call is however not performed if the transaction of the microflow rolls back. This is the case, when the reference qualifier asynchronous invocation of the microflow is set to commit.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s