[rules-users] Migration 3 to 4 (replace "->")

Edson Tirelli tirelli at post.com
Thu Oct 4 11:10:10 EDT 2007


     Markus,

     We do support "->" in Drools 4.0 for backward compatibility, but we do
advise you to not use anymore, since we will drop support to it sometime in
the future. The alternative is simply to use an in-line eval:

BlaBlub( number : id, eval( BlaClass.staticFunction( number ) ) )

   Also, we now have auto-vivification of attributes, so you don't need to
bind "id" anymore, if you will only use it inside the eval:

BlaBlub( eval( BlaClass.staticFunction( id ) ) )

   I don't know if it was a typo in your e-mail, but you are missing a ")"
in the end of the line of your mapping:

[when]ist BlaBlub=BlaBlub(number : id -> ( BlaClass.staticFunction(number ))
)
    Hope it helps.

      Edson


2007/10/4, Markus Helbig <mhelbig81 at googlemail.com>:
>
>
>    In Drools 3 i used the following code (in a DSL file):
>
>    [when]ist BlaBlub=BlaBlub(number : id -> ( BlaClass.staticFunction(
>    number ))
>
>    where id can be resolved be method getId in class BlaBlub and
>    staticFunction ist a public static function in a helper class.
>
>    Drools 4 doesn't allow me this construct, how should this be
>    migrated?
>
>    Any help is much appreciated
>
>    Cheers
>
>    Markus
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071004/9328c34d/attachment.html 


More information about the rules-users mailing list