Dear All,
We have a requirement the similar thing might have different LHS and RHS based on different config. I checked the drools document, it looks like we can maintain hundreds DRI files to get this done. I'm planning put the LHS and RHS into the database and then maintain just one DRI file or no file to dynamically generate the rules and fire them. I tried to put the LHS into one field of the fact and check this field using the eval(), it seems not working.
Checking the related topics, there are mentioned similar cases, there are 3 major options:
1) Using the string to dynamically build rule and store the whole string into the DB or using the API dynamically create rules;
2) Keep one DRI file and put the placeholding into the LHS and RHS and replace the placeholder using the velocity or any other template framework;
3) Using drools template if the fields are fixed
I'm wondering if there is any other more elegant way can make this happen? How you guys make your drools development? How many DRI files do you have to maintain?
http://drools-moved.46999.n3.nabble.com/Writing-rules-using-java-td57894.htmlhttp://drools-moved.46999.n3.nabble.com/How-to-create-a-drl-file-or-decision-table-dynamically-td3772708.htmlThanks,
Shawn