[rules-users] DrlParser not supporting temporal operators
Edson Tirelli
ed.tirelli at gmail.com
Fri Nov 20 08:59:06 EST 2009
All operators in drools are pluggable. Whenever you use the
KnowledgeBuilder to parse/compile rules, it will automatically build a
static registry of available operators for the parser, but if you use the
lower level parser API, you need to register the operators by yourself. Just
write the following line of code, before parsing anything:
new EvaluatorRegistry();
This will statically initialize the registry with the operators shipped
with Drools. If you create your own operators, you can add them to the cache
by doing:
EvaluatorRegistry registry = new EvaluatorRegistry();
registry.addEvaluatorDefinition( new MyEvaluatorDefinition() );
[]s
Edson
2009/11/20 Swapnil Raverkar <swapnil.raverkar at gmail.com>
>
> I am trying to dump an XML equivalent of a DRL file using DrlParser &
> XMLOutputter.
>
> But when my rules file has rules with temporal operators
> DrlParser.parser(inputStream) throws a NullPointerException.
>
> Why DrlParser is not supporing temporal operators yet?
>
>
> Cheers,
>
> Swapnil
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091120/953f1af9/attachment.html
More information about the rules-users
mailing list