Message cases
Message cases are used in Message Switch actions. To add a message case to an existing message switch, right-click the message switch and select Add Message Case from the menu.
Each message case is configured to match a specific message that was captured more generically by the message switch. When combined, the message switch and any one of its message case actions work like a complete Subscribe action. The message switch specifies the general transport and destination information, while the message case performs detailed filtering and contains the assert and store options.
If the message switch is part of a stub, the Config tab provides the option to check and set the state of the stub. Under Start State and Finish State, you can select one of the available session states (configured under the Properties tab of the stub). If a start state is selected, the actions within the message case are executed only if the stub session equals the selected state. If a finish state is selected, the session is set to that state once the actions under the message case finish executing.
Additionally, before any of the actions within the message case can be executed, any filter expressions that are added under the Config tab must evaluate to true. At the very least, the expressions must evaluate to one if the OR Expressions option is selected. Filter expressions are available for message cases in both tests and stubs.
- ECMAScript
- Any standard ECMAScript, such as JavaScript™. Enter or paste the script for the condition in the space provided. The script must evaluate to either true or false.
- Legacy
- To use a built-in or custom function, click Add, right click in the space provided, click Select Function, and choose the function to add.
Click Test to see the output of the filter expressions, using the current values of any included tags.
The standard filter, assert, and store actions are available under the remaining tabs within the message case.
The message case contains its own actions that can be carried out when a matching message is received.