The Java Semantic Module is available through the Drools Rule Language (DRL)
by binding the namespace of http://drools.org/rules
to
either the default namespace or a specific prefix. Typically it is bound to
the default prefix. This module augments the DRL syntax and exists
within the same namespace as the core tags.
<rule-set xmlns="http://drools.org/rules"
...>
The base <rule>
tag allows the definition
of a simple empty rule. The name
attribute is
required to uniquely identify a rule within a <rule-set>
<rule-set xmlns="http://drools.org/rules" name="Employee Termination Rules"> <rule name="Fire Slacker"> ... </rule> </rule-set>
The <duration>
tag allows for the definition
of rules with that require a truth duration. This base
tag allows a statically-defined duration which a rule must hold
true before firing the consequence. A duration on a rule may be
thought to be a time-delay between the matching of a rule and the
subsequent firing of a rule.
The tag accepts the attributes of days
, hours
,
minutes
, and seconds
to specify the delay.
<rule-set xmlns="http://drools.org/rules" name="Employee Termination Rules"gt;
<rule name="Fire Slacker">
...
<duration days="1"
minutes="1"/>
</rule>
</rule-set>