What version of Guvnor are you using? It sounds very old.

In Guvnor 5.4.0 you can add a "BRL Fragment" column to the web-guided decision table.

Using this column type you can define an Action that can be free-format DRL and contain template keys (e.g. $1, $2, $3).

Your code block could then be used verbatim.

On 17 October 2012 12:21, ayonchak <ayon.chakraborty@genworth.com> wrote:
Hi All,

I am facing some problem when migrating from excel-based drools to Drools
Guvnor. Suppose we are using some function in the Conditions and Actions of
excel. But how to write them in Guvnor as in Guvnor I can only get the value
of the condition and set the value of the variable in action. Then I can
manipulate the value in code. But is there any option of doing that in Rule?

Like I am using this in an action of excel based Drools -

long mnthlyBnft=$1*1L;
if(planRule.getMonthlyBnftList().size() == 0)
  {
     do
    {
         planRule.getMonthlyBnftList().add(mnthlyBnft);
         mnthlyBnft = mnthlyBnft + $3;
    }while(mnthlyBnft<=$2);
}

In the values I am giving 3 comma-separated values for $1, $2 and $3.

How to do the same in Guvnor? I saw the new function option in Guvnor but
didn't find anywhere how to use that in Web-Guide based decision table rule.
Please help me. Thanks!

Ayon



--
View this message in context: http://drools.46999.n3.nabble.com/How-to-Use-functions-in-Web-Guided-Editor-tp4020324.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users