Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread maverik j
Ohh ..that was tricky - I neeed to read this sincerely :) thanks a ton for all your help and time Thanks & Regards, Maverik 2011/1/4 Wolfgang Laun > You have omitted the regular expressions from some of the variable > definitions > in DSL entries: > > [when][] {attr:\S+} follows pattern {

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread Wolfgang Laun
You have omitted the regular expressions from some of the variable definitions in DSL entries: [when][] {attr:\S+} follows pattern {x:\S+} = startsWithFunction({attr},{x}) Restore them all, and it's OK. -W 2011/1/4 maverik j > Here is the complete DSL/DSLR > > DSLr: > rule "Your First Rule"

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread maverik j
Here is the complete DSL/DSLR DSLr: rule "Your First Rule" when There is a Department There is at least one Person - with a valid subOrdinate - check that name follows pattern "M" then >System.out.println("Test Generic Cosntranit done !!!"); end DSL: [keyword][]check that {con

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread Wolfgang Laun
Do you have any comments ("#..." or "//...") between when and then? If so, please remove and try again. If this doesn't fix it, please post completely and exactly - the rule from the DSLR - the full DSL - Drools version. Thanks -W 2011/1/4 maverik j > > > 2011/1/4 Wolfgang Laun > > >> >> 20

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread maverik j
2011/1/4 Wolfgang Laun > > > 2011/1/4 maverik j > > is there any restriction in terms of using custom function in condition >> etc. >> If I add function evaluation to conditions its messing up with dsl. For >> pattern matching if I use custom function defined in drl then its not able >> to pars

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread Wolfgang Laun
2011/1/4 maverik j > is there any restriction in terms of using custom function in condition > etc. > If I add function evaluation to conditions its messing up with dsl. For > pattern matching if I use custom function defined in drl then its not able > to parse that properly > > [when][] {attr:\S

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-04 Thread maverik j
is there any restriction in terms of using custom function in condition etc. If I add function evaluation to conditions its messing up with dsl. For pattern matching if I use custom function defined in drl then its not able to parse that properly [when][] {attr:\S+} follows pattern {pattern:\S+} =

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-03 Thread maverik j
cool...this was of great help, I will try this out I think it shoudl solve the purpose. Thanks once again, Maverik 2011/1/3 Wolfgang Laun > Try using eval as a last resort. A better (smaller, more robust) DSL can be > designed around facts and their attributes. > > "||" (and "OR") can be used,

Re: [rules-users] using complex evaluate expressions with DSL

2011-01-03 Thread Wolfgang Laun
Try using eval as a last resort. A better (smaller, more robust) DSL can be designed around facts and their attributes. "||" (and "OR") can be used, but setting parentheses in order to get the priority right is difficult. In constraints, you may have to resort to "memberof" or "not memberof". You

[rules-users] using complex evaluate expressions with DSL

2011-01-03 Thread maverik j
Hi, We are planning to use DSL/DSRL approach with generic DSL template like say [condition][]The {object} has valid {field}={object}({field} != null ) [condition][]there is object {*obj*} that = {*obj*}() [condition][]- has {*attr*} equal {*val*} = {*attr*} == {*val*} [condition][]- has valid