Access Keys:
Skip to content (Access Key - 0)


2 assign

Print this page

Assigning values to variables

You can create new user variables or assign new values to existing variables in an interceptor script block, the same way you can for a composition script block — by using the <assign> element.

Reassigning IN Signaling Parameters
If the value of any IN signaling parameters are changed in a <service-input-interceptor> block, these changes apply to the current composition service only. They do not carry forward to subsequent service invocations, unless the response from the composition service demands it (for example, if the service response is a function of a modified input parameter). This behaviour does not apply to SIP.

Example

This example shows a script that invokes one service, changes the ServiceKey parameter of the IN InitialDP trigger event for the second service using an interceptor block, then invokes a third service (using the original service key value):

VIA Diagrams
Script XML
<script>
  <invoke service="VPN"/>
  <invoke service="HomeZone">
    <service-input-interceptor>
      <if>
        <present variable="${initial-dp}"/>
        <then>
          <assign toVariable="${initial-dp.arg.service-key}" value="15"/>
        </then>
      </if>
    </service-input-interceptor>
  </invoke>
  <invoke service="Prepay"/>
</script>
Adaptavist Theme Builder Powered by Atlassian Confluence