To open a macro diagram, double-click the macro’s icon in the SISView macro list. Below is an example of a macro diagram, plus details on comparator, string, present, variable, literal, group operators, and macro invocation elements.

Macro diagram

Below is an example of a freshly created macro.

FreshMacro

Comparator elements (equal, not-equal, greater-than, less-than)

Comparator elements work the same as well-known operators named similarly. Each operand/parameter can be:

  • a specific value

  • the value of any other existing variable

  • a complex variable type (such as a CalledPartyNumber)

  • the result of a string-manipulation function (such as a substring or string-length).

Comparators
Tip

To configure a comparator element:

  • drop it from the Palette onto the macro diagram

  • double-click the element.

A dialog opens to configure the two operands for the comparason.

Special string elements (starts-with, ends-with, contains, matches)

These operators, which return true or false (like comparator elements), check whether text strings start with, end with, or contain a sub-string; or match a regular expression.

StringCompare
Tip

To configure a string element, double-click it.

A dialog opens to set the values and variables for the operation.

Present element

The present element checks if a variable is set — if (at the time of the check) it’s in the list of global variables that the SIS keeps.

Present

Variable manipulator elements (assign, delete)

Through the assign element, a variable can be set to:

  • a specific value,

  • the value of any other existing variable

  • a complex variable type (such as a CalledPartyNumber)

  • the result of a string-manipulation function (such as a substring or string-length).

Through the the delete element, an existing variable can be "unset".

AssignAndDelete
Note An assign or delete element implicitly always evaluates to true.

Literals (true, false)

Literal diagram elements represent the Boolean literals: true and false.

TrueFalse

Group operators (and, or, not)

Group operator elements represent the logical and, or, and not operators. As such, they are the only elements in a condition tree diagram (except the tree root) which have successor elements.

AndOrNot
Warning

The SIS scripting language uses short-circuit boolean evaluation. In this current release of VIA,, the order of arguments to AND and OR expressions is based on the order in which they have been associated with the AND or OR symbol. If you are relying on the behaviour of short-circuit boolean evaluation (for example to guard an ASSIGN or DELETE), then you must take care with the order you define the parameters to AND and OR.

You can view the generated XML in VIA to check that your expression is indeed correct. To fix any problems, you can simply remove the connections to each parameter in your AND and OR expression, and re-attach them in the correct order.

Macro invocation element

Through the macro element, you can invoke other existing macros. When the SIS evaluates this element at runtime, it returns the value that the referenced macro returns.

Macro
Previous page Next page