[rules-users] [Optaplanner] Help on drl

Tales Costa tales at ibiseng.com
Fri Nov 29 18:34:05 EST 2013


Wolfgang,

Thanks for the explanation. It helps.

regards


On Fri, Nov 29, 2013 at 6:00 AM, Wolfgang Laun <wolfgang.laun at gmail.com>wrote:

> On 28/11/2013, Tales Costa <tales at 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 at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20131129/31b9aa9f/attachment.html 


More information about the rules-users mailing list