Service Invoke mediation primitive properties
You can specify values for mediation primitive properties either by using the property fields in the IBM® Integration Designer user interface or by using an XML format. The property field names displayed in IBM Integration Designer are generally different from the property names used when building a mediation flow using XML code. In the following information, icons are used to identify each property name used in IBM Integration Designer and the corresponding XML name. (Where applicable, XML names that are required, but not shown in IBM Integration Designer, are also described.)
Reference name referenceName
The name of the service reference to be called. The reference name is associated with a WSDL interface. Initially, the reference name is set through an IBM Integration Designer window, and cannot be changed afterward. You have to create a new Service Invoke mediation primitive to change the reference name.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | String Note:
|
Operation name operationName
The name of the service operation to be called. The operation name is associated with a WSDL operation. Initially, the Operation Name is set through an IBM Integration Designer window; and cannot be changed afterward. You have to create a new Service Invoke mediation primitive to change the operation name.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | String Note:
|
Use dynamic endpoint if set in the message header useDynamicEndpoint
Determines whether the SMO header field Target, if present, should be used to override the service endpoint specified by the reference operation. You can use the Endpoint Lookup mediation primitive to set the Target field, or you can set the field yourself.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | true |
Async timeout (seconds) asyncTimeout
The time to wait for a response, when a call is asynchronous with a deferred response. The Async Timeout property is not used for calls that are asynchronous with callback.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Integer Note:
If the Async Timeout is 0, there is no wait and the response is immediate. If the Async Timeout is -1, the wait is indefinite. When a timeout occurs the timeout terminal is fired. A timeout is treated as an unmodeled fault, with regard to retry. |
Default | 5 |
Require mediation flow to wait for service response when the flow component is invoked asynchronously with callback. forceSync
This property is only effective for request-response operations, where the invocation style property is either Async (Compatibility) or Default (Compatibility). Set the property to true, (select the check box), to force a service call to act in a synchronous manner. If true, an asynchronous call causes a deferred response, rather than a callback. Set this property to true if the whole mediation flow is to run in a single transaction (in this case, the reference qualifier "Asynchronous" must also be set to "Call", since the default qualifier setting "Commit" would result in a deadlock.) If you set this property to false and the mediation primitive is involved in a FanOut/FanIn operation or is contained in a subflow, the runtime environment will override your setting and force the service call to act in a synchronous manner.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | false |
Invocation style invocationStyle
When the synchronous style is used, the service is performed under the same processing thread as the mediation flow. When the asynchronous style is used, a new processing thread is used when invoking the service. The asynchronous style allows the mediation flow to continue before a response is received from the service. The invocation style can affect the transactional scope that applies to the service invocation, and whether a timeout might occur if the service fails to respond. The following tables can be used to identify which invocation style to use.
Request-response |
---|
As target |
Sync |
Async with deferred response |
Async with callback |
Async (Compatibility) |
Default (Compatibility) |
One way |
---|
As target |
Sync |
Async one way |
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 | Sync | ||
Async with deferred response | Async with deferred response | ||
Async with callback | Async with callback |
Property | How the mediation flow component is called | Preferred interaction style of the target | Invocation Style |
---|---|---|---|
As target | Sync | Sync | Sync |
Async one way | Async or any | Async one way | |
Async with deferred response | |||
Async with callback | |||
Sync | Sync | ||
Async one way | Async one way |
Property | How the mediation flow component is called | Preferred interaction style of the target | Require mediation flow to wait for service response when the flow component is invoked asynchronously with callback. | Invocation Style |
---|---|---|---|---|
Async (Compatibility) | Sync | Sync | ||
Async with deferred response or async one way | Async with deferred response | |||
Async with callback | True | Async with deferred response | ||
False | Async with callback | |||
Default (Compatibility) | Sync, async with deferred response or async one way | Sync or Any | Sync | |
Async | Async with deferred response | |||
Async with callback | Sync | Sync | ||
Async or Any | True | Async with deferred response | ||
False | Async with callback |
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values |
Note:
|
Default | Default |
Parameter mappings parameterMappings
The Parameter mappings table is enabled only when working in Message Enrichment mode. You can use the Parameter mappings table to specify XPath expressions that identify elements to be transformed within the input message, and also to specify XPath expressions that define where the elements of the response message must be placed.
Field detail | Value and notes |
---|---|
|
Propagate request headers to service being invoked propagateRequestHeader
The Propagate request headers to service being invoked check box is enabled only when working in Message Enrichment mode. Select this check box if you want the request message, which is sent to the service, to be populated with the header of the input message that is received at the in terminal. When this check box is clear, the header is excluded from the request message.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | false |
Propagate response headers from service being invoked propagateResponseHeader
The Propagate response headers from service being invoked check box is enabled only when working in Message Enrichment mode. Select this check box if you want the output message to be populated with the response message header from the service being invoked. When this check box is clear, the header of the input message that was passed into the mediation primitive is used.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | false |
enrichmentMode
Use this property to enable Message Enrichment mode, whereby a section of the input message, which is received at the in terminal of the Service Invoke mediation primitive, is used for the service invocation.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | false |
Retry on retryOn
Determines whether, and how, fault responses cause a retry. This property is applicable only to request-response operations.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values |
Note:
To enable retry, you must set the value of the Retry On property to: Any fault, Unmodeled fault or Modeled fault. Modeled faults are those that are explicitly listed in a WSDL file; any other fault is an unmodeled fault. |
Default | Never |
Retry count retryCount
How many times a service call should be retried before an output terminal is fired. The output terminal that is fired can be of the following types: modeled fault, timeout or fail.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Integer Note:
The value can be zero or a positive integer. |
Default | 0 |
Retry delay (seconds) retryDelay
The delay (in seconds) between retry attempts.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Integer Note:
The value can be zero or a positive integer. |
Default | 0 |
Try alternate endpoints tryAlternateEndpoints
Determines if any alternate endpoints in the SMO should be used on retries. Set to true, (select the check box), to try alternate endpoints.
This functionality is available only if the Use Dynamic Endpoint is also specified. If any fault is returned by the initial service request, and the retry count is greater than zero, the first endpoint from the alternate endpoint list is used for the retry. If the retry returns a fault, and the next retry would not exceed the retry count, the next alternate endpoint is used. After the last endpoint in the alternate endpoints list is used, the initial endpoint is used again.
For example, suppose that the first endpoint is ServiceA, and the alternate endpoints are ServiceB and ServiceC. If the retry count is 5, the sequence of service calls is as follows: ServiceA, ServiceB, ServiceC, ServiceA, ServiceB, ServiceC.
Field detail | Value and notes |
---|---|
Required | Yes |
Valid values | Boolean Note:
|
Default | true |
Considerations
- Setting the Async timeout property to -1, (an indefinite wait), can have a performance impact. If the service call is asynchronous with a deferred response, server resources are consumed until a reply is received.
- When using parallel processing, by making service calls asynchronously with a callback, you should consider the impact on event sequencing.
- The Invocation style property overrides other default properties that have been specified throughout the module.
Sample XML code
<node name="ServiceInvoke" type="ServiceInvoke">
<property name="referenceName" value="myInterfacePartner"/>
<property name="operationName" value="emit"/>
<inputTerminal type="myInterface:myRequestMsg"/>
<outputTerminal name="timeout" type="myInterface:myRequestMsg">
<wire targetNode="MessageLogger1"/>
</outputTerminal>
<failTerminal/>
</node>