Class ScriptAction<StateEntityType extends StateEntity>
java.lang.Object
org.chenile.stm.impl.STMActionBase<StateEntityType>
org.chenile.stm.action.scriptsupport.BaseCustomComponentPropertiesAction<StateEntityType>
org.chenile.stm.action.scriptsupport.BaseScriptingAction<StateEntityType>
org.chenile.stm.action.scriptsupport.ScriptAction<StateEntityType>
- All Implemented Interfaces:
ComponentPropertiesAware
,ScriptingStrategyAware
,STMAutomaticStateComputation<StateEntityType>
public class ScriptAction<StateEntityType extends StateEntity>
extends BaseScriptingAction<StateEntityType>
Mimics a script. The value of the last line of the script is returned as the event from this action.
It uses the current scripting strategy for the evaluation. The code custom attribute is supported.
Ex: <script code="(a == 100)? 'go ahead' : 'stop'"/>
would evaluate to "go ahead" if a is 100 else it would evaluate to 'stop'
Languages such as OGNL support the comma operator which allows more exotic expressions. See the
testcase for an example.
- Author:
- Raja Shankar Kolluru
-
Field Summary
Fields inherited from class org.chenile.stm.action.scriptsupport.BaseScriptingAction
scriptingStrategy
Fields inherited from class org.chenile.stm.action.scriptsupport.BaseCustomComponentPropertiesAction
componentPropertiesHelper, enableInlineScriptsInProperties
-
Constructor Summary
-
Method Summary
Methods inherited from class org.chenile.stm.action.scriptsupport.BaseScriptingAction
setScriptingStrategy
Methods inherited from class org.chenile.stm.action.scriptsupport.BaseCustomComponentPropertiesAction
getComponentProperty, getComponentProperty, isEnableInlineScriptsInProperties, setComponentPropertiesHelper, setEnableInlineScriptsInProperties
Methods inherited from class org.chenile.stm.impl.STMActionBase
cleanUp, doSetup, execute
-
Field Details
-
CODE
- See Also:
-
-
Constructor Details
-
ScriptAction
public ScriptAction()
-
-
Method Details
-
doExecute
- Overrides:
doExecute
in classSTMActionBase<StateEntityType extends StateEntity>
- Throws:
Exception
-