What version of Guvnor are you using? It sounds very old.<br><br>In Guvnor 5.4.0 you can add a "BRL Fragment" column to the web-guided decision table.<br><br>Using this column type you can define an Action that can be free-format DRL and contain template keys (e.g. $1, $2, $3).<br>
<br>Your code block could then be used verbatim.<br><br><div class="gmail_quote">On 17 October 2012 12:21, ayonchak <span dir="ltr"><<a href="mailto:ayon.chakraborty@genworth.com" target="_blank">ayon.chakraborty@genworth.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br>
<br>
I am facing some problem when migrating from excel-based drools to Drools<br>
Guvnor. Suppose we are using some function in the Conditions and Actions of<br>
excel. But how to write them in Guvnor as in Guvnor I can only get the value<br>
of the condition and set the value of the variable in action. Then I can<br>
manipulate the value in code. But is there any option of doing that in Rule?<br>
<br>
Like I am using this in an action of excel based Drools -<br>
<br>
long mnthlyBnft=$1*1L;<br>
if(planRule.getMonthlyBnftList().size() == 0)<br>
{<br>
do<br>
{<br>
planRule.getMonthlyBnftList().add(mnthlyBnft);<br>
mnthlyBnft = mnthlyBnft + $3;<br>
}while(mnthlyBnft<=$2);<br>
}<br>
<br>
In the values I am giving 3 comma-separated values for $1, $2 and $3.<br>
<br>
How to do the same in Guvnor? I saw the new function option in Guvnor but<br>
didn't find anywhere how to use that in Web-Guide based decision table rule.<br>
Please help me. Thanks!<br>
<br>
Ayon<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://drools.46999.n3.nabble.com/How-to-Use-functions-in-Web-Guided-Editor-tp4020324.html" target="_blank">http://drools.46999.n3.nabble.com/How-to-Use-functions-in-Web-Guided-Editor-tp4020324.html</a><br>
Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br>