Difference between revisions of "JavaScriptCondition"

From GreenVulcano Wiki
Jump to: navigation, search
(Created page with "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 are bou...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
This feature allows you to specify conditions that the incoming object, possibly in connection with the elements in the environment, must meet.
 
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 are bound the following variables:
+
In the JavaScript context the following variables have bee defined:
* "environment" -> the execution environment  
+
* environment : the execution environment  
* "dataName" -> the name of the environment object to check  
+
* dataName : the name of the environment object to check  
* "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:
Line 29: Line 29:
 
Its subelements are:
 
Its subelements are:
 
* Description
 
* Description
* Script
+
* Script: containing the JavaScript script.

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.