Class IfAction<StateEntityType extends StateEntity>

All Implemented Interfaces:
ComponentPropertiesAware, ScriptingStrategyAware, STMAutomaticStateComputation<StateEntityType>

public class IfAction<StateEntityType extends StateEntity> extends BaseScriptingAction<StateEntityType>
Implements an IF action using the same expression language as the one supported by the ScriptingStrategy. Support custom properties "condition", "then" and "else". If the condition evaluates to true then the "then" event is returned else the "else" event is returned.

The three attributes can also contain constructs such as ${xxx} which would also be evaluated against the flow context. Ex: <if condition='a == 100' then='enabled' else='disabled'/> if a (which is a property of the StateEntity) is 100 then the enabled event would be returned else the disabled event would be returned.

Author:
Raja Shankar Kolluru