[rules-users] "or" operator with only one condition??

Edson Tirelli tirelli at post.com
Tue Jun 5 08:30:25 EDT 2007


   The DRL parser does not accept such syntax. If the XML parser accepts and
builds the correct Descr structure, than there should be no major problems.

   []s
   Edson

2007/6/5, Bruno Miguel Duarte <est-b-duarte at ptinovacao.pt>:
>
>  Hi Guys,
>
>
>
> Although doesn't make sense, is there any problem if I write the next
> rules?
>
>
>
> XML:
>
>       <rule name="OR with one condition">
>
>             <lhs>
>
>                   <or>
>
>                         <column object-type="RAFact">
>
>                               <literal evaluator="==" field-name="type"
> value="groupId" />
>
>                               <literal evaluator="==" field-name="value"
> value="6" />
>
>                         </column>
>
>                   </or>
>
>             </lhs>
>
>             <rhs>
>
>                   System.out.println("Something...");
>
>             </rhs>
>
>       </rule>
>
>
>
> DRL:
>
> rule "OR with one condition"
>
>        when
>
>             or RAFact( type == "groupId" , value == 6 )
>
>
>
>        then
>
>             System.out.println("Something...");
>
> end
>
>
>
> In my tests, it seems the XML version is accepted (and correct) because
> the parser ignores the 'or'!
>
>
>
> Thanks in advance,
>
> Bruno Duarte
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070605/3fd8f98c/attachment.html 


More information about the rules-users mailing list