Two or more services may be invoked in parallel by using the <parallel> element.

Warning Only the initial event is delivered in parallel to services in a parallel block. Subsequent events are delivered in serial to any parallel block services that remain in the call path after the initial event, in the order the services are defined within the parallel block.
Tip

The SIS views a parallel block in the same way it does a regular service — as a black box that accepts input and may generate output. A parallel block is still invoked sequentially with respect to other <invoke> or <parallel> elements within the composition.

The fact that the parallel block actually invokes multiple services is immaterial as far as SIS composition evaluation is concerned.

Example

In the following example, the SIS delivers the initial event to the VPN and Homezone services in parallel, favouring the result of VPN as the primary service. After both services have responded, and assuming neither service releases the call, the SIS proceeds to invoke the Prepay service.

VIA diagram

parallelblock

Script XML

<script>
    <parallel>
        <invoke service="VPN" primary="true"/>
        <invoke service="HomeZone"/>
    </parallel>
    <invoke service="Prepay"/>
</script>

Attributes and child elements

A <parallel> element has the following possible attributes and child elements.

Attributes

Name Description Optional?
 timeout

Specifies the timeout period, measured in milliseconds, that the SIS will wait for all responses during initial event processing. If present, this timeout overrides the default service timeout configured for the SIS. If the timeout period for the parallel block is less than the timeout period of any individual service within that parallel block, it’s possible for the parallel block as a whole to timeout, in which case the timeout behaviour specified for the parallel block takes precedence over any timeout behaviour specified for individual services within the parallel block.

 on-timeout

Specifies the behaviour the SIS will take if the parallel block fails to obtain a suitable response within its specified timeout period. The supported values for this attribute are:

  • ignore-service-and-continue — remove all services in the parallel block from further interaction with the composition and continue delivery of any current event to the next service

  • terminate-processing — terminate processing of the current event; the SIS will not send any response to the network for this event (if relevant) unless the fail child element is also specified.

The default value if this attribute is not specified is ignore-service-and-continue.

Child elements

Name Description Optional?
 invoke

Indicates a service to be invoked in parallel. Any number of <invoke> elements may be specified. Each <invoke> element has the same syntax as described for regular composition invoke statements, with the addition of an extra boolean primary attribute. Exactly one of the services in the parallel block must be flagged as the primary service. The outcome of a parallel block is determined as follows:

  • if any of the invoked services release the call, the release is the final result and all other services in the parallel block are terminated

  • otherwise, the final response of the primary service is used, and final responses from all other services are discarded.

 service-input-interceptor

A service input interceptor. The SIS evaluates this input interceptor before it delivers any event to services in the parallel block.

 service-output-interceptor

A service output interceptor. The SIS evaluates this output interceptor whenever the parallel block, as a whole, generates output intended for the network.

 terminate

This element can only be specified if the on-timeout attribute is set to terminate-processing. It specifies a terminate clause that the SIS will use to send a response for the current event.

 message-handling-options

This element specifies configurable options for how the SIS manages specific messages received from the parallel block.

 extension-options

Specifies arbitrary extension options supported by the SIS for service invocation. This is a collection of extension-option elements each with a name and optional value. The sole extension option currently supported for parallel blocks is:

Option Description Required Value
 SIP:use-service

Indicates to the SIS that any parallel triggering logic for SIP should be performed by a service, bypassing the default SIS parallel triggering logic. The referenced service must be a local service. If the service is not local or is not present and active in Rhino, the SIS falls back to its default parallel triggering behaviour. See Parallel Triggering Service for information about parallel triggering services.

A service reference name.

Previous page Next page