Why not put the parameters into a &quot;container&quot; Fact in WM?<br>
<br>
rule &quot;bundle A - included units&quot;<br>

        dialect &quot;mvel&quot;<br>

        when<br>
               Parameters($p1 : param1, $p2 : param2, $p3 : param3)<br>

                $order : OrderDTO( )<br>

                $line : OrderLineDTO( itemId == $p1, $quantity : quantity ) from<br>

$order.lines<br>

                SubscriptionResult( userId == $order.userId, itemId == $p2, subscribed<br>

== true )<br>

                $pricing : PricingResult(userId == $order.userId, itemId == $p3)<br>

        then<br>

                $order.getLines().remove($
<blockquote class="gmail_quote">line);<br>
                OrderLineBL.addItem($order, $p3, new Integer($quantity.intValue()),<br>
$pricing.getPrice());update($order);<br>
end<br>
</blockquote>
You could load the &quot;Parameter&quot; objects either with a lower salience rule or from Java; both from a database.<br>
<br>
The issues with Guvnor sound like a bug to me and I request you raise a JIRA for investigation.<br>
<br>
Thanks,<br>
<br>
Mike<br><br><br><div class="gmail_quote">On 27 December 2010 12:27, wasim.khan318 <span dir="ltr">&lt;<a href="mailto:khanwasim07@yahoo.co.in">khanwasim07@yahoo.co.in</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
It is  a Test Code , and  i  am very new to java and drools<br>
 i have a inbuilt<br>
rule &quot;bundle A - included units&quot;<br>
        dialect &quot;mvel&quot;<br>
        when<br>
                $order : OrderDTO( )<br>
                $line : OrderLineDTO( itemId == 16, $quantity : quantity ) from<br>
$order.lines<br>
                SubscriptionResult( userId == $order.userId, itemId == 12, subscribed ==<br>
true )<br>
                $pricing : PricingResult(userId == $order.userId, itemId == 13)<br>
        then<br>
                $order.getLines().remove($line);<br>
                OrderLineBL.addItem($order, 13, new Integer($quantity.intValue()),<br>
$pricing.getPrice());update($order);<br>
end<br>
<br>
i want  to modify this rule like<br>
<br>
rule &quot;bundle A - included units&quot;<br>
        dialect &quot;mvel&quot;<br>
        when<br>
                $order : OrderDTO( )<br>
                $line : OrderLineDTO( itemId == param1, $quantity : quantity ) from<br>
$order.lines<br>
                SubscriptionResult( userId == $order.userId, itemId == param2, subscribed<br>
== true )<br>
                $pricing : PricingResult(userId == $order.userId, itemId == param3)<br>
        then<br>
                $order.getLines().remove($line);<br>
                OrderLineBL.addItem($order, param3, new Integer($quantity.intValue()),<br>
$pricing.getPrice());update($order);<br>
end<br>
1.i want to replace hardcoded value to params as ItemId16 to param1<br>
,Itemid12 to param2 so when any one see my rule can not guess about<br>
hardcoded value. and i want that the values of param1,param2 some how come<br>
from database<br>
2.Till now what i did from my reading and exploring is<br>
i have created java functions in jboss which returns value like<br>
GetParam1(some var),GetParam2(some var),GetParam3()<br>
i tested them in jboss drools application they are working fine<br>
3. then i build package and  upload in guvnor<br>
4.while writing technical ander Fact field i am getting only GetParam3() not<br>
GetParam1(some var) and<br>
GetParam2(some var)<br>
5. I dont know why . when i remove parameter value say make GetParam1() ,<br>
without parameter it comes under class field.<br>
6. please tell me is it right approach and if right then how i handle<br>
GetParam1(some var) ,because they return param1 value which passed in<br>
modified rule<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Modifying-in-built-rule-in-new-formatt-tp2151450p2151450.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Modifying-in-built-rule-in-new-formatt-tp2151450p2151450.html</a><br>

Sent from the Drools - User 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>
</font></blockquote></div><br>