rule engine - Using drools expert with dynamic decision tables -


This is what I had to do.

I had to give the "rule" in the database table. This is a type of Dallas XLS decision table format, except that there will be rows in all the rules table. In this way I can easily modify the rules I should put it in a table and not an xls because my rules can often change whether it is possible drools? Can I prepare a Knowledgebase with rules derived from a DB (rather than a DRL or an XLS file), and by changing the rules every time I can reboot the Knowledge Base from scratch (or maybe only in parts of the Knowledgebase, Only update those rules that have changed.)

It depends on the fact that Which types of rules do you consider in database-supported Approach makes sense if you have a lot of rules that have the same structure, and which vary according to just a few 'parameters' in this case you can write a general rule, and all applicable combinations are stored You can use the database to do this. For example, suppose you have rules for calculating the shipping rate per country for an order, such as <$ p>

  rule "shipping rate in France" when $ order: order (country == 'fr') then $ order.setShippingRate (10.0); update order); The same rules for the end / other countries ...  

You can replace these rules with your rules, where each CountryShippingRate rate for a country Specifies. Then when you enter all CountryShippingRate rows such as commodities and rules in the rule session, such as:

  Rules "shipping rate" when $ order: order ($ country : Country) Country Shipping Rate ($ rate: rate, country == $ country) then $ order.setShippingRate ($ rate); update order); In the end,  

In practice, it has been found that many decision table types rules can be rewritten in such a way.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -