[rules-users] DSL expression - ??

Edson Tirelli tirelli at post.com
Mon Sep 24 09:44:37 EDT 2007


    In Drools 4.0, DSL mappings support regexp expressions. "+" is a regexp
special character, so you need to escape it in your mapping key (only in the
key):

{name}."{indic}"\+:{value}={name}.putIndicator("{indic}",{name}.get("{indic}")+{value});

    I believe this will fix your problem.

    []s
    Edson


2007/9/24, vdelbart <delbart.v at mipih.fr>:
>
>
> Hi,
>
> I have this in my DSL consequence :
>
>
> {name}."{indic}"+:{value}={name}.putIndicator("{indic}",{name}.get("{indic}")+{value});
> {name}."{indic}":{value}={name}.putIndicator("{indic}",{value});
>
> If I write in my dslr :
>
> ...
> then
>         ex."eeee"+:200
>         ex."eeee":200
> end
>
> the mapping is :
>
> then
>         ex."eeee"+:200
> ex.putIndicator("eeee",ex.get("eeee") + 200);
> end
>
> Why I have not this :
> then
> ex.putIndicator("eeee",ex.get("eeee") + 200);
> ex.putIndicator("eeee",200);
> end
> :confused::confused:
>
> thanks,
>
> V.
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/DSL-expression------tf4507913.html#a12856258
> Sent from the drools - user mailing list archive at Nabble.com.
>
> _______________________________________________
> 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/20070924/3f6ec724/attachment.html 


More information about the rules-users mailing list