![]() |
|
![]() ![]() ![]() |
Creating Scripts for Testing > Using Scripts to Simulate IC and CTI Connectors > Creating a Connector Script > Additional Configuration Options in Connector Scripts | |
![]() |
Additional Configuration Options in Connector Scripts |
In addition to the basic configuration options available with comparison and action tag sets, you can use other options to refine the way your scripts work.
See the following sections:
Combining Comparisons and Actions
You can use multiple comparison and action tags to perform multiple comparisons or actions in the same configuration. Using multiple comparisons and actions is equivalent to performing a Boolean and Operation: For the actions to be performed, all comparisons must first evaluate as true. When all comparisons evaluate as true, then all actions are performed.
For example, consider the following snippet of code:
In this configuration, the script first checks the id field of the vdu variable, to see if it contains the value 1122334455. If it does not, then the command does not execute. If it does, the script continues to the next comparison. The second comparison checks to see if the workflow variable has a value of myworkflow. If it does, the script then performs both actions.
In this example, the actions the script takes are to:
Selecting One Comparison/Action Set Instead of Another
You can use multiple configurations to evaluate a series of comparisons and perform a particular action or set of actions. Using multiple configurations is equivalent to performing a Boolean OR operation: For the actions to be performed, one particular comparison or set of comparisons must evaluate as true.
Configurations are evaluated in order, so you must take care when placing each configuration to be evaluated. As soon as the simulator evaluates a configuration as true, the simulator performs the corresponding actions. The simulator ignores all remaining configurations for that command.
For example, consider the following snippet of code:
In this example, the simulator evaluates the first configuration. If the value of the vdu variable id field is 1122334455, the simulator sets the value of the workflowoutput field to the first value (someValue). The simulator then considers this command completed and the application continues.
If the value of the vdu variable id field is anything other than 1122334455, the simulator continues to the second configuration. The second configuration uses the asterisk (*) wildcard for the value element. This value means that the second configuration accepts any value for the vdu variable id field. In this case, the simulator sets the value of the workflowoutput field to the second value (anotherValue).
Tip:
In this example, because any other value for the vdu variable id field is acceptable, you can also use the key word ALL. In this example, that means you can substitute the code <compare type="ALL" /> in place of the line:
![]() ![]() ![]() |
©2009, Avaya Inc. All rights reserved.
|