Never duplicate any derived information while the data object holding the duplicate is still in the system.<br><br>Given an invoice, you may associate its positions with a &quot;tariff id&quot;, which lets you recalculate an (old) order repeatedly, guaranteeing stable pricing.<br>
<br>Only when this data is removed from the system you actually calculate and use the currency values.<br><br>-W<br><br><br><br><div class="gmail_quote">2011/4/17 Riyaz Saiyed <span dir="ltr">&lt;<a href="mailto:riyaz.saiyed@emirates.com">riyaz.saiyed@emirates.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">








<div link="blue" vlink="purple" lang="EN-US">

<div>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Hi,</span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">I&#39;m doing a POC on drools
decision table. We need to develope pricing engine for few of our products. I
created xls with list of products and their price as per drools format. When I
load xls and run the rules, the price were picked up correctly against mathing
product, customer and quantity criteria.</span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Now I want to save the
executed rule so the if there is any modification in quantity
(increase/decrease), I can calculate the price again based on earlier executed
rule and not from xls.</span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">I think to achieve the, I
need to store the &quot;rule&quot; against every order for each product. </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Can any one suggest me, how
I can get the string representation of the executed rule so that I can create
.drl file from that string and run the same rule again for any order
modification.</span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">I&#39;ve looked at
SpreadsheetCompiler and was able to get the string of all the rules as a result
of compile method. </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Note - I can not read xls
again for order modification because, if in between the price in xls has
changed, the engine should still pick the old price.</span></font></p>

<p class="MsoNormal" style=""><font face="Courier New" size="2"><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"> </span></font></p>

<p class="MsoNormal"><font face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana;">Thanks,</span></font></p>

<p class="MsoNormal"><b><font color="#336600" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: rgb(51, 102, 0); font-weight: bold;">Riyaz</span></font></b><b><font color="#336600" face="Verdana" size="2"><span style="font-size: 10pt; font-family: Verdana; color: rgb(51, 102, 0); font-weight: bold;"></span></font></b></p>


<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

</div>

</div>


<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>
<br></blockquote></div><br>