You can use interceptors in compositions to inspect and manipulate the signaling between services.
This lets you:
-
blend services developed in isolation — by intercepting and changing the signaling, to ensure each can be executed correctly
-
augment the behaviour of services (in ways not imagined when the services were developed).
There are four types of interceptor that can be used within a composition:
Type | Invoked when… | |
---|---|---|
composition input |
…the SIS receives a new message from the network, to deliver to composition services. The SIS invokes the interceptor before delivering the message to the services. (white triangle on the start node in the VIA diagram) |
|
service input |
…the SIS determines a need to deliver a message to an individual composition service. The SIS invokes the interceptor after determining the need, but before actually delivering the message. (white triangle on the top of the VPN/Prepay services in the VIA diagram) |
|
service output |
…a service generates a message it intends for the network. The SIS invokes the interceptor before processing the message. (white triangle on the bottom of the VPN/Prepay services in the VIA diagram) |
|
composition output |
…the SIS determines messages generated by services in the composition should be sent to the network. The SIS invokes the interceptor before writing the messages to the network. (white triangle on the end node in the VIA diagram) |
SIS for IN re-evaluates interceptors in a composition script every time it invokes them — so conditional branches in an interceptor can define behaviour depending on the input messages to the interceptor. SIS for SIP only evaluates interceptors on the initial request. |
Interceptor script blocks
An interceptor script block is written directly inside the composition. The syntax of an interceptor script block in a composition is identical to that of interceptors installed as individual SIS components.