<br>&nbsp;&nbsp; All,<br><br>&nbsp;&nbsp; This is a limitation of the current DSL engine implementation. The problem is not really the &quot;or&quot;, but the &quot;-&quot; implementation. The LHS and RHS of a DSL rule are processed line by line, so, to allow the behavior you are requesting, we will need to implement some look ahead mechanism with smart interpolation that does not exist today.
<br>&nbsp;&nbsp; I&#39;m not sure if someone already opened a ticket for that, but in case not, may I ask you please to open? We will look into supporting that in the future.<br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><br><div><span class="gmail_quote">
2007/9/12, Andy Mei &lt;<a href="mailto:andy.d.mei@gmail.com">andy.d.mei@gmail.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am having the same problem as Stephane does.<br><br>It&#39;s pretty bad if I need to hard code the &#39;or&#39; constraint within a single DSL constraint.&nbsp; I guess I could split a complex OR constraint to multiple rules with the same consequences, it just an ugly hack.&nbsp; Also, how does this work if we need a Or constraint within another group constraint?
<br><br>I just don&#39;t understand why the following doesn&#39;t work.<span class="q"><br><br><div><span><font color="#0000ff" face="Courier New" size="2">[condition][]There is a Cheese with=Cheese()</font></span>
</div></span>
<div><span><font color="#0000ff" face="Courier New" size="2">[condition][]- age is less than {low} =age &lt; 
{low}</font></span></div>
<div><span><font color="#0000ff" face="Courier New" size="2">[condition][]Or=or</font></span></div><span><font color="#0000ff" face="Courier New" size="2">[condition][]- 
</font></span><span><font color="#0000ff" face="Courier New" size="2">age is more than {high}</font></span><span><font color="#0000ff" face="Courier New" size="2">=age &gt; {high}
</font></span>

<div><span><br></span></div><br><div><div><span class="e" id="q_114fa4a95086d45d_3"><span class="gmail_quote">On 9/11/07, <b class="gmail_sendername"><a href="mailto:stephane.remillieux@agysoft.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
stephane.remillieux@agysoft.fr</a></b> &lt;
<a href="mailto:stephane.remillieux@agysoft.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">stephane.remillieux@agysoft.fr</a>&gt; wrote:</span></span></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><span class="e" id="q_114fa4a95086d45d_5">
<p>Hi Vincent,</p><p>Thanks for your answer but I would really like to use my
synthax.</p><p>I need to write &quot;or&quot; between 2 constraints and not in
a single complex constraint.</p><p>If someone else could help me
...</p><p></p><p>
DELBART Vincent &lt;<a href="mailto:delbart.v@mipih.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">delbart.v@mipih.fr</a>&gt; a écrit :</p><div><span><br>
<br>
&gt; Hello Stephane,<br>
&gt;<br>
&gt; I think it&#39;s difficult to do that. Could you try this :<br>
&gt; There is a Cheese with<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; - age is less than 42 or age is more than 60<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; - type is &#39;stilton&#39;<br>
&gt; with in your DSL<br>
&gt; [condition][]There is a Cheese with=Cheese()<br>
&gt; [condition][]- age is less than {low} or age is more than {high}=age <br>
&gt; &lt; {low} || age &gt; {high}<br>
&gt; [condition][]- type is &#39;{type}&#39;=type == &quot;{type}&quot;<br>
&gt;<br>
&gt; I don&#39;t see other solution...<br>
&gt;<br>
&gt; vdelbart<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ________________________________<br>
&gt;<br>
&gt; De : <a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a> <br>
&gt; [mailto:<a href="mailto:rules-users-bounces@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users-bounces@lists.jboss.org</a>] De la part de <br>
&gt; <a href="mailto:stephane.remillieux@agysoft.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">stephane.remillieux@agysoft.fr</a><br>
&gt; Envoyé : mardi 11 septembre 2007 10:16<br>
&gt; À : <a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">rules-users@lists.jboss.org</a><br>
&gt; Objet : [rules-users] Adding constraints to facts in DSL<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Hello,<br>
&gt;<br>
&gt; I&#39;m using JBossDrools in my company and I have some problems with DSL.<br>
&gt;<br>
&gt; Actually, I would like to write something like this :<br>
&gt;<br>
&gt; There is a Cheese with<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; ( - age is less<br>
&gt; than 42<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; or<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; -&nbsp; age is more than 60 )<br>
&gt;&nbsp; &nbsp; &nbsp; &nbsp; - type is<br>
&gt; &#39;stilton&#39;<br>
&gt;<br>
&gt; Unfortunately, It&#39;s the drools parser which manage &quot;-&quot; char.<br>
&gt;<br>
&gt; Also this previous synthax don&#39;t work in the LHS.<br>
&gt;<br>
&gt; Anyone could help me to do an equivalent condition in my DSL ? If <br>
&gt; possible with &quot;-&quot; sugar char.<br>
&gt;<br>
&gt; Stephane.<br>
&gt;<br>
&gt; PS : Sorry, for my very bad english.<br>
&gt;<br>
&gt;<br>
&gt; ----------------------------------------------------------------<br>
&gt; This message was sent using IMP, the Internet Messaging Program.<br>
&gt;<br>
&gt;<br>
<br>
<div title="1189517934055"></div><br>
<br>
----------------------------------------------------------------<br>
This message was sent using IMP, the Internet Messaging Program.<br>
</span></div><br></span></div>_______________________________________________<br>rules-users mailing list<span class="q"><br><a href="mailto:rules-users@lists.jboss.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
rules-users@lists.jboss.org
</a><br></span><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote>
</div>
<br>
<br>_______________________________________________<br>rules-users mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">
https://lists.jboss.org/mailman/listinfo/rules-users</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>&nbsp;&nbsp;Edson Tirelli<br>&nbsp;&nbsp;Software Engineer - JBoss Rules Core Developer<br>&nbsp;&nbsp;Office: +55 11 3529-6000<br>&nbsp;&nbsp;Mobile: +55 11 9287-5646
<br>&nbsp;&nbsp;JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a>