Hi,
I'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.
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.
I think to achieve the, I
need to store the "rule" against every order for each product.
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.
I've looked at
SpreadsheetCompiler and was able to get the string of all the rules as a result
of compile method.
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.
Thanks,
Riyaz