[rules-users] DrlParser not supporting temporal operators
Swapnil Raverkar
swapnil.raverkar at gmail.com
Fri Nov 20 22:13:29 EST 2009
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 at 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 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
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091121/e435e003/attachment.html
More information about the rules-users
mailing list