0
votes

I'm trying to implement Drools in our project, but I really don't know which method to adopt. First of all, our project is about creating marketing campaigns for mobile network operators. So, we've got a Web UI where we let the user define his own rules for the campaign.. Now.. here's my problem. Should i try to translate everything in the UI in a custom drl with a custom agenda-name (because there can be many custum campaigns with different flows), or should I create an object with different properties which should reflect the chosen options in the web-ui and then use it in my rules to create the behaviour?

If I should go with the first option, how can I store it? Should I store the drl in Guvnor(but the models my change from time to time.. not the attributes used in the rules, other attributes.. and I can't import several jars from an url to have access to the models, can I?) or in DB, and the dynamically add the rules at run-time?

1
My guess is that there is only a limited amount of Drools experts on the SO forums and that you are better off asking questions like the above in a Drools forum (like here). I'm sure that design choices like you are facing have been encountered by other Drools uers before. Cheers, Wim - Wivani

1 Answers

0
votes

Both of the options will work. My first intuition would be to create an object model that reflects the choices in your UI. You can then add this object to the knowledgebase and trigger your rules based on it.

If you do go with the first option you can store the rules in Guvnor or you could also store the rules in a database and import the rules from a stream at runtime. I'm currently working on a large enterprise project that incorporates drools changes via guvnor and the models change quite regularly. We have not had any issues uploading new models into guvnor.