[rules-users] How to Use functions in Web-Guided Editor

ayonchak ayon.chakraborty at genworth.com
Wed Oct 17 07:21:34 EDT 2012


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.


More information about the rules-users mailing list