I am having the same problem as Stephane does.<br><br>It's pretty bad if I need to hard code the 'or' constraint within a single DSL constraint. I guess I could split a complex OR constraint to multiple rules with the same consequences, it just an ugly hack. Also, how does this work if we need a Or constraint within another group constraint?
<br><br>I just don't understand why the following doesn't work.<br><br><div><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">[condition][]There is a Cheese with=Cheese()</font></span>
</div>
<div><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">[condition][]- age is less than {low} =age <
{low}</font></span></div>
<div><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">[condition][]Or=or</font></span></div><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">[condition][]-
</font></span><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">age is more than {high}</font></span><span class="247000609-11092007"><font color="#0000ff" face="Courier New" size="2">=age > {high}
</font></span>
<div><span class="247000609-11092007"><br></span></div><br><div><span class="gmail_quote">On 9/11/07, <b class="gmail_sendername"><a href="mailto:stephane.remillieux@agysoft.fr">stephane.remillieux@agysoft.fr</a></b> <
<a href="mailto:stephane.remillieux@agysoft.fr">stephane.remillieux@agysoft.fr</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<p>Hi Vincent,</p><p>Thanks for your answer but I would really like to use my
synthax.</p><p>I need to write "or" between 2 constraints and not in
a single complex constraint.</p><p>If someone else could help me
...</p><p></p><p>
DELBART Vincent <<a href="mailto:delbart.v@mipih.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">delbart.v@mipih.fr</a>> a écrit :</p><div><span class="e" id="q_114f4d4d6540a394_1"><br>
<br>
> Hello Stephane,<br>
><br>
> I think it's difficult to do that. Could you try this :<br>
> There is a Cheese with<br>
> - age is less than 42 or age is more than 60<br>
> - type is 'stilton'<br>
> with in your DSL<br>
> [condition][]There is a Cheese with=Cheese()<br>
> [condition][]- age is less than {low} or age is more than {high}=age <br>
> < {low} || age > {high}<br>
> [condition][]- type is '{type}'=type == "{type}"<br>
><br>
> I don't see other solution...<br>
><br>
> vdelbart<br>
><br>
><br>
><br>
> ________________________________<br>
><br>
> 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>
> [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>
> <a href="mailto:stephane.remillieux@agysoft.fr" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">stephane.remillieux@agysoft.fr</a><br>
> Envoyé : mardi 11 septembre 2007 10:16<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>
> Objet : [rules-users] Adding constraints to facts in DSL<br>
><br>
><br>
><br>
> Hello,<br>
><br>
> I'm using JBossDrools in my company and I have some problems with DSL.<br>
><br>
> Actually, I would like to write something like this :<br>
><br>
> There is a Cheese with<br>
> ( - age is less<br>
> than 42<br>
> or<br>
> - age is more than 60 )<br>
> - type is<br>
> 'stilton'<br>
><br>
> Unfortunately, It's the drools parser which manage "-" char.<br>
><br>
> Also this previous synthax don't work in the LHS.<br>
><br>
> Anyone could help me to do an equivalent condition in my DSL ? If <br>
> possible with "-" sugar char.<br>
><br>
> Stephane.<br>
><br>
> PS : Sorry, for my very bad english.<br>
><br>
><br>
> ----------------------------------------------------------------<br>
> This message was sent using IMP, the Internet Messaging Program.<br>
><br>
><br>
<br>
<div title="1189517934055"></div><br>
<br>
----------------------------------------------------------------<br>
This message was sent using IMP, the Internet Messaging Program.<br>
</span></div><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>