JavaScriptCondition

From GreenVulcano Wiki
Revision as of 13:23, 20 February 2012 by Anonymous (talk)
Jump to: navigation, search

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.