<br>   Ahmed,<br><br>   Drools Fusion is an extension to Drools Expert. Everything you can do in Drools Expert, is also available in Drools Fusion. Please take a look at the Drools Expert manual:<br><br><a href="http://www.jboss.org/drools/documentation.html">http://www.jboss.org/drools/documentation.html</a><br>
<br>    Regarding your questions:<br><br>rule xyz<br>when<br>    $a : Event(  ) or<br>    $b : Event(  )<br>then<br>    // ...<br>end<br><br>    As I mentioned in my previous e-mail. Drools is FOL complete, so you can nest your constraints as you like. Assuming a,b,c,d and e are patterns:<br>
<br>rule Exp <br>when<br>     (A(...) and B(...) and C(...)) or (D(...) and E(...))<br>then<br>    // ...<br>end<br><br>rule a <br>when<br>    B(...) and (not(B(...))) // this will only be true if constraints inside b are not the same, obviously<br>
then<br>   // ...<br>end <br><br>    []s<br>    Edson<br><br><br><br><div class="gmail_quote">2009/8/26 Ahmed Hafsi <span dir="ltr">&lt;<a href="mailto:hafsi@fzi.de">hafsi@fzi.de</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Guys ,<br>
I am using the latest version of drools fusion .<br>
Is it possible to create new operators ? For example I want to make the<br>
logic rule OR<br>
i.e :<br>
a :- b;c.<br>
I know I can make a rule for it like this ::<br>
<br>
rule _Rule<br>
when<br>
$a Event()<br>
$b Event(this after $a || this before $a)<br>
then<br>
//..<br>
end<br>
<br>
can I embed this rule to make more complex logical rules ? say for example I<br>
want to represent the following rule :<br>
Exp :- (a AND b AND c) OR (d AND e)<br>
<br>
One more question ::<br>
<br>
how can I represent the not operator ? i.e :<br>
a :- b AND (NOT(b))<br>
<br>
Thanks,<br>
Khalil Hafsi<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>