On 13/11/2013, Stephen Masters <stephen.masters(a)me.com> wrote:
Of course, you can just bypass the built in “-“ processing.
[condition][]There is a Person = $p: Person()
[condition][]The person is aged over "{age}” =$age: Integer(this > {age})
from $person.age
Of course that does require that you’re careful about writing the DSLR, so
that you always bind a variable to Person() before using a phrase which
expects that variable to exist.
btw … Apologies, but Integer(this > {age}) is almost certainly buggy syntax.
I can’t remember off-hand the best way to do that comparison. :-/
Integer( intValue > {age} )
-W
On 13 Nov 2013, at 11:52, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
> Gee, we all have work to do to earn our keep. If you provide the dough
> you can have instant bread ;-)
>
> I suggest you redesign your DSL with phrases like
> There is a {Fact}
> and a {FactA} from {FactB}'s {attribute}
>
> Users would have to write these in individual lines. Then, adding the
> "- with" doesn't create a problem.
>
> Other than this, I don't see much hope for getting the constraint
> where it belongs. Consider that *you* think right *now*, that it ought
> to be in the first pattern, but s.o. else might want it in the middle
> one...
>
> -W
>
> On 13/11/2013, braveheart85 <andrea.pacifico.85(a)gmail.com> wrote:
>> Nobody can help me?
>>
>>
>>
>> --
>> View this message in context:
>>
http://drools.46999.n3.nabble.com/Problem-in-writing-rule-and-apply-DSL-t...
>> Sent from the Drools: User forum mailing list archive at
Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users(a)lists.jboss.org
>>
https://lists.jboss.org/mailman/listinfo/rules-users
>>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users