Service action spawning conditions govern whether a service action executes. When you map service bundles to service actions, by default the service actions are assigned a spawning condition of Always, meaning that no conditions will prevent them from running. The conditions associated with the service action must evaluate to True for the service action to be spawned.
The labels used in the evaluation of the service action spawning condition are those that are derived as a result of the upstream parameters to service action parameter mapping. Use the service action labels in your spawning expression.
On the Service Bundle editor Service Actions tab, you can define the following spawning conditions for service actions:
Always: the service action is always spawned for this service bundle.
Equals: the service action is spawned only if the specified parameter has a particular value.
Defined: the service action is spawned only if the specified parameter is present.
Not Defined: the service action is spawned only if the specified parameter is not present.
You can optionally define a logical expression that is used with one of the delivered spawning conditions, where ASAP will execute the service action if both the out-of-the-box expression and your user-defined expression evaluate to true. You can define a logical expression using a number of criteria. The range of options available allows a service action to be executed if the service action parameter value is within a set range of values, or if the service action parameter is greater than, less than, or equal to, a specified value. You can combine multiple expressions using an AND or OR operator.
The following sections describe how to formulate logical expressions.
If more complicated spawning logic is required (that is, the out-of-the-box spawning capability is not sufficient), enable the Include Expression check box on the Service Bundle editor Service Actions tab and define a logical expression in the associated text box.
The logical expression mechanism works in cooperation with one of the out-of-the-box spawning expressions. For example, if you have specified a service action condition of Equals and have created a logical expression, both of these conditions must evaluate to true in order for the service action to be executed. If you want only the logical expression to trigger the execution of the service action, then use the action condition of Always and specify a logical expression.
The following operators can be used to define logical expressions:
Operators | Description |
---|---|
AND, OR, NOT | Operators used to create compound expressions. For example:
|
ISDEF, NOTDEF | Operators that can be used with single parameters. For example:
Note: Always use brackets with these operators. |
>, <, >=, =<, =, != | The parameter values must be able to be converted to integers. For example:
|
LIKE, !LIKE | String operators. The strings being evaluated must be placed inside quotation marks. It is also possible to use wildcard syntax such as the % (to specify one or more characters) and ? (acts on a single character). For example:
Note: Always use brackets with these operators. |
Logical expressions are limited to a length of 255 characters.
Logical Expression Operational Order
To specify the order of operations, use as many parentheses as needed; for example:
((A < 8) OR ((NOTDEF B) AND ((C != 3) OR (NOT (D = 9)))))
Logical Expression Error Conditions
There are two error conditions that may arise as a result of the use of logical expressions:
Using the integer operator when the input parameter cannot be converted to an integer (all SRT parameters are strings initially)
The specified parameter label is not present
In such cases, the evaluation of an expression will fail and a SYS_ERR message will be generated in the diagnostics. However, this error does not fail the work order but simply results in the exclusion of this particular atomic action from being spawned.
Note:
The syntax of complex expressions is not currently checked by Oracle Communications Design Studio but is checked by ASAP at run time.Defining Service Action Spawning Logic
Associating Service Actions with the Service Bundle
Understanding Upstream Interface Parameters
Mapping Upstream Interface Parameters to Service Action Parameters
In the Service Bundle editor Service Actions tab, select the service action for which you want to define spawning logic.
Define the conditions as required by selecting an out-of-the-box condition (Always, Equals, Defined, Not Defined). Optionally, you can also define your own logical expression by selecting Include Expression and providing an expression. See "Understanding Service Action Spawning Conditions" for more information.