Hi,
XML rule format wasn't updated to drools 5 new operators, because the
lack of interest of the users
Sent from my phone
El 24/11/2009, a las 05:21, Swapnil Raverkar
<swapnil.raverkar(a)gmail.com> escribió:
Can anyone help me with this?
Cheers,
Swapnil
2009/11/21 Swapnil Raverkar <swapnil.raverkar(a)gmail.com>
Thanks Edson. That worked.
But the problem is that if i am using a temporal operator condition
as: this before[5s, 0s] $res
the equivalent XML generated is as follows:
<field-constraint field-name="this">
<variable-restriction evaluator="before" identifier="$res"
/>
</field-constraint>
over here [5s,0s] information is getting lost in the transformation.
Is there any fix for this?
Cheers,
Swapnil
2009/11/21 Edson Tirelli <ed.tirelli(a)gmail.com>
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(a)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(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users