Difference between revisions of "JavaScriptCondition"
Line 6: | Line 6: | ||
* logger : a Log4J Logger instance | * logger : a Log4J Logger instance | ||
− | The JavaScriptCondition Element is used by: [[Conditions]], [[NextAction]]. | + | The JavaScriptCondition Element is used by: [[Conditions]], [[ServiceCallerTask#NextAction|NextAction]]. |
The following table shows the JavaScriptCondition element's attributes: | The following table shows the JavaScriptCondition element's attributes: |
Latest revision as of 12:42, 23 February 2012
This feature allows you to specify conditions that the incoming object, possibly in connection with the elements in the environment, must meet.
In the JavaScript context the following variables have bee defined:
- environment : the execution environment
- dataName : the name of the environment object to check
- logger : a Log4J Logger instance
The JavaScriptCondition Element is used by: Conditions, NextAction.
The following table shows the JavaScriptCondition element's attributes:
Attribute | Type | Description |
---|---|---|
type | fixed | This attribute must assume the value condition. |
class | fixed | This attribute must assume the value it.greenvulcano.gvesb.internal.condition.JavaScriptCondition. |
condition | required | This attribute defines the name of the condition. Unique inside the 'Conditions' element. |
throw-exception | optional | If true an error during execution cause an Exception to be thrown.
If false an error during execution cause the condition to return "false". Default to "false". |
scope-name | optional | This attribute defines the 'scope' to be used for script execution. |
script-file | optional | This attribute is the name of the file containing the script to evaluate. |
Its subelements are:
- Description
- Script: containing the JavaScript script.