[rules-users] Adding constraints to facts in DSL

stephane.remillieux at agysoft.fr stephane.remillieux at agysoft.fr
Tue Sep 11 09:44:12 EDT 2007



  Hi Vincent,

  Thanks for your answer but I would really like to use my synthax.

  I need to write "or" between 2 constraints and not in a single
complex constraint.

  If someone else could help me ...

  DELBART Vincent <delbart.v at mipih.fr> a écrit :

> Hello Stephane,
>
> I think it's difficult to do that. Could you try this :
> There is a Cheese with
>         - age is less than 42 or age is more than 60
>         - type is 'stilton'
> with in your DSL
> [condition][]There is a Cheese with=Cheese()
> [condition][]- age is less than {low} or age is more than
{high}=age
> < {low} || age > {high}
> [condition][]- type is '{type}'=type == "{type}"
>
> I don't see other solution...
>
> vdelbart
>
>
>
> ________________________________
>
> De : rules-users-bounces at lists.jboss.org 
> [mailto:rules-users-bounces at lists.jboss.org] De la part de 
> stephane.remillieux at agysoft.fr
> Envoyé : mardi 11 septembre 2007 10:16
> À : rules-users at lists.jboss.org
> Objet : [rules-users] Adding constraints to facts in DSL
>
>
>
> Hello,
>
> I'm using JBossDrools in my company and I have some problems with
DSL.
>
> Actually, I would like to write something like this :
>
> There is a Cheese with
>         ( - age is less
> than 42
>                 or
>         -  age is more than 60 )
>         - type is
> 'stilton'
>
> Unfortunately, It's the drools parser which manage "-" char.
>
> Also this previous synthax don't work in the LHS.
>
> Anyone could help me to do an equivalent condition in my DSL ? If 
> possible with "-" sugar char.
>
> Stephane.
>
> PS : Sorry, for my very bad english.
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20070911/31c166b7/attachment.html 


More information about the rules-users mailing list