public class Rule extends Object
Represents a rule. This is currently a repetition rule, a manual activation rule or a required rule.
Constructor and Description |
---|
Rule(PlannableItem context,
TExpression tExpression,
boolean defaultValue) |
Modifier and Type | Method and Description |
---|---|
String |
getCondition()
Get the expression string from the rule.
|
PlannableItem |
getContext() |
boolean |
isTriggered(PlanItem planItem,
TransitionData transitionData,
EvaluationListeners evaluationListeners)
Method to evaluate this
Rule . |
String |
toString() |
public Rule(PlannableItem context, TExpression tExpression, boolean defaultValue)
context
- the plannable itemtExpression
- the expressiondefaultValue
- true if it is the default value, false otherwisepublic PlannableItem getContext()
public String getCondition()
Get the expression string from the rule. Extracts it from the rule definition XML.
public boolean isTriggered(PlanItem planItem, TransitionData transitionData, EvaluationListeners evaluationListeners)
Method to evaluate this Rule
.
planItem
- the plan item (evaluation context)transitionData
- optional evaluation contextevaluationListeners
- evaluation listenerstrue
if there is no underlying TExpression
, or if the unterlying
TExpression
evaluates to true
. Returns false
otherwise. Expression strings of
true
or false
resolve inline (without invoking the engine listener) to their respective value.Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.