IBM BPM, V8.0.1, All platforms > Programming IBM BPM > Enterprise Service Bus programming > Invocation of Services > Service invocation styles

Invocation Style property for request-response operations

The "Invocation Style" property of the Service Invoke mediation primitive or the Callout node determines the invocation style used to invoke a service.

Within IBM Integration Designer for a request-response operation by Callout node or Service Invoke mediation primitive, the options for the invocation style property on the Details page are:

The Async (Compatibility) and Default (Compatibility) invocation style options are compatible with earlier versions. These options provide a check box for an additional property which influences invocation style: "Require mediation flow to wait for service response when the flow component is invoked asynchronously with callback". It is recommended that you use the non-compatibility invocation style options.


As target

The As target invocation style takes account of the Preferred Interaction Style that is specified on the target component, or import that is invoked by the mediation flow.

When the mediation flow component is invoked as Sync, it is not possible to asynchronously return a response to its caller. As a result, the mediation flow uses the Sync invocation style when it is invoked Sync, even if the Preferred Interaction Style of the target is set to Async.

Invocation style used by the mediation flow component for As target invocations.

The following table details the results for all cases of how the mediation flow component is invoked:

Property How the mediation flow component is called Preferred interaction style of the target Invocation style
As target Sync   Sync
Async one way Sync Sync
Async with deferred response Async or any Async with callback
Async with callback


Sync

The Callout node or Service Invoke mediation primitive invokes the service using the synchronous invocation style (Synchronous invocation).


Async with callback

The Callout node or Service Invoke mediation primitive invokes the service using the asynchronous invocation style. It can continue and complete processing of the mediation flow. A new instance of the mediation flow receives the response from the service at a later time, when it is available. When using the async with callback invocation style, users must be aware that if the mediation flow component is invoked synchronously, any response from the async with callback is not used as part of the response message back to the original synchronous invocation. This is because a synchronous invocation is performed on a single thread of execution.

The async with callback invocation style is not supported in a subflow, error flow or an aggregation block.


Async with deferred response

The Callout node or Service Invoke mediation primitive invokes the service using the asynchronous invocation style. It can continue and complete processing of the mediation flow. At a later time, the service requester calls the service provider for a response.

Service invocation styles