[rules-users] OR

Edson Tirelli tirelli at post.com
Tue Feb 5 06:31:14 EST 2008


    This looks like a bug in the DSL template engine.
    May I ask you plz to open a JIRA?

    If you want to try to fix it yourself and submit the patch, it is
probably easy to do it. Probably only a matter of fixing the patterns in
DefaultExpander class. Otherwise, I will do it as soon as I have time.

    Thanks,
       Edson

2008/2/5, Markus Helbig <mhelbig81 at googlemail.com>:
>
> No solution for the problem below?
>
> Ok so the question is: Is it possible to combine DSL language and DSRL
> language in a DSLR file?
>
> 2008/1/28, Markus Helbig <mhelbig81 at googlemail.com>:
> > ok this works, BUT using a DSL it fails again.
> >
> > DSL:
> >
> > [condition][]is a Person=Person()
> > [condition][]- female=sex == "f"
> > [condition][]- male=sex == "f"
> > [condition][]- age {value}=age=={value}
> >
> > DSLR:
> >
> > rule
> >     when
> >          ($person: is a Person
> >                - male
> >                - age 60
> >          or
> >          $person: is a Person
> >                - female
> >                - age 70)
> >     then
> > end
> >
> > resolves to:
> >                                 |
> >                                \/
> > .... ($person: Person( , sex="m", age == 60)
> >      or
> >       $person: Person(sex="f", age == 70))
> >
> >
> > the "," seems to be the problem ..
> >
> > Cheers
> >
> > Markus
> >
> > 2008/1/28, Krishnan Sivaramakrishna Iyer <krishiyer at gmail.com>:
> > >
> > > Hi Markus,
> > >
> > > can u try this please ?
> > >
> > > (pensioner : Person( sex == "f", age > 60 )
> > >  or pensioner : Person( sex == "m", age > 65 ) )
> > >
> > > -Krishnan
> > >
> > > Markus Helbig wrote:
> > > > This is from Drools documentation
> > > >
> > > > Example 6.36. or with binding
> > > >
> > > > pensioner : (or Person( sex == "f", age > 60 )
> > > >                 Person( sex == "m", age > 65 ) )
> > > >
> > > > Explicit binding on each Pattern is also allowed.
> > > >
> > > > (or pensioner : Person( sex == "f", age > 60 )
> > > >     pensioner : Person( sex == "m", age > 65 ) )
> > > >
> > > >
> > > > but trying to get this to work resolves in:
> > > >
> > > > [60,8]: unknown:60:8 Unexpected token 'or'[62,8]: unknown:62:8
> > > > mismatched token: [@639,2279:2291='Person',<7>,62:8]; expecting type
> > > > RIGHT_PAREN[62,81]: unknown:62:81 mismatched token:
> > > > [@656,2352:2352=')',<12>,62:81]; expecting type THEN
> > > >
> > > > Any ideas (using Drools 4.0.4)?
> > > >
> > > > Cheers
> > > >
> > > > Markus
> > > > _______________________________________________
> > > > rules-users mailing list
> > > > rules-users at lists.jboss.org
> > > > https://lists.jboss.org/mailman/listinfo/rules-users
> > > >
> > >
> > > _______________________________________________
> > > rules-users mailing list
> > > rules-users at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/rules-users
> > >
> >
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  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/20080205/63ee294c/attachment.html 


More information about the rules-users mailing list