Drools respects encapsulation, so it works with javabean method name
conventions. If you have a method isApplication() that returns a boolean,
does not matter how your class calculates the return value. Same for any
other method. In 4.0, you can write:
ObjectA( application == true || banker == true )
To map that as a DSL, just follow your usual procedure and syntax.
[]s
Edson
2007/8/21, Saleem Lakhani <Saleem.Lakhani(a)citizensfla.com>:
Hi,
If I had a rule written in DSL using Drools 3.0 like;
1. [when] when1=r : ObjectA( )
2. [when] when2=eval(r.isApplication() || r.isBanker())
There are no attributes in class Object with name application and banker
but there are methods in ObjectA with names isApplication() & isBanker()
which does some work and return Boolean based on some facts.
What is the correct way of writing the same rule using Drools 4.0 ?
Also, if the above attributes were present in ObjectA what would have been
the best way to write it in DSL using Drools 4.0
Thanks,
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @
www.jboss.com