Hi,
One can not stress enough the importance of rule governance.
However, in your case, I think there is a quite simple solution to the
problem.
Why would you want to store decision logic to calculate a value that you
already know and that shouldn't change anymore? I think, in stead of storing
your rule, you should save the outcome of the rule. I.e. save the calculated
price and use this price in further calculations, rule executions, ....
There are possibilities to use datetimes as well, but I don't think that is
necessary in this example.
Regards,
Frank
Riyaz Saiyed wrote:
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
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
View this message in context:
http://drools.46999.n3.nabble.com/Drools-Decision-Table-tp2830218p2833441...
Sent from the Drools: User forum mailing list archive at
Nabble.com.