The Tests describe the circumstances that representrepresent
a match for this rule. The Consequence gets fired when the
Conditions match.
See Also: Eval See Also:Consequence author: bob mcwhirter author: Simon Harris author: mark proctor
Add a pattern to the rule. All patterns are searched for bindings which are then added to the rule
as declarations
Parameters: condition - The Test to add. throws: InvalidRuleException -
Retrieve a parameter Declaration by identifier.
Parameters: identifier - The identifier. The declaration or null if no declaration matchesthe identifier.
Uses the LogicTransformer to process the Rule patters - if no ORs are
used this will return an array of a single AND element. If there are Ors
it will return an And element for each possible logic branch. The
processing uses as a clone of the Rule's patterns, so they are not
changed.
throws: InvalidPatternException -
This field is updated at runtime, when the first logical assertion is done. I'm currently not too happy about having this determine at runtime
but its currently easier than trying to do this at compile time, although eventually this should be changed
This returns true is the rule is effective.
If the rule is not effective, it cannot activate.
This uses the dateEffective, dateExpires and enabled flag to decide this.
This will return if the semantic actions or predicates in the rules
are valid.
This is provided so that lists of rules can be provided even if their semantic actions
do not "compile" etc.
Determine if this rule is internally consistent and valid.
This will include checks to make sure the rules semantic components (actions and predicates)
are valid.
No exception is thrown.
A Rule must include at least one parameter declaration and
one condition.
true if this rule is valid, elsefalse.
setActivationGroup
public void setActivationGroup(String activationGroup)(Code)
setAgendaGroup
public void setAgendaGroup(String agendaGroup)(Code)
Set the truthness duration object. This causes a delay before the firing
of the Consequence if the rule is still true at the end of
the duration.
Parameters: duration - The truth duration object.