Wolfgang,

Thanks for the explanation. It helps.

regards


On Fri, Nov 29, 2013 at 6:00 AM, Wolfgang Laun <wolfgang.laun@gmail.com> wrote:
On 28/11/2013, Tales Costa <tales@ibiseng.com> wrote:
> Hi,
>
> I am new to Drools and Optaplanner and have built a first model and
> succeeded running with java score calculation. Now am struggling trying to
> use rules for score.
>
> Have read "Drools Expert User Guide" and looked through Optaplanner
> examples but am still confused. Main difficult is discovering what can do
> and canīt do with java dialect within the "when" and "then" blocks. Are
> there tutorial and/or other references I could look into for more
> information on this ?

The rules are actually quite simple.

LHS: Any boolean expression is valid, with the shortcuts for accessing
members. If the parser misbehaves, try eval() - there it's pure Java.

RHS: Java code, as in any method, plus the "macros" defined in Expert.

That said, some things should not be done:
   * Never use side effects in LHS expressions that modifies anything
in working memory.
   * Don't write long "then" parts; calling static methods is preferred.

-W





>
> regards
>
> Tales
>

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users