简体   繁体   English

流口水实施问题

[英]Drools implementation problem

I'm trying to implement Drools in our project, but I really don't know which method to adopt. 我正在尝试在我们的项目中实现Drools,但是我真的不知道采用哪种方法。 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. 因此,我们有了一个Web UI,可以让用户为广告活动定义自己的规则。....这是我的问题。 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? 我应该尝试使用自定义议程名称在自定义drl中转换UI中的所有内容(因为可能有许多具有不同流程的custum广告系列),还是应该创建一个具有不同属性的对象,该对象应反映网络中的所选选项? -ui,然后在我的规则中使用它来创建行为?

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? 我应该将drl存储在Guvnor中吗(但是我会不时更改模型..不是规则中使用的属性,其他属性..并且我无法从URL导入多个jar来访问模型,还是在数据库中,然后在运行时动态添加规则?

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. 如果您确实选择了第一个选项,则可以将规则存储在Guvnor中,也可以将规则存储在数据库中,并在运行时从流中导入规则。 I'm currently working on a large enterprise project that incorporates drools changes via guvnor and the models change quite regularly. 我目前正在从事一个大型企业项目,该项目通过guvnor合并了流口水更改,并且模型定期更改。 We have not had any issues uploading new models into guvnor. 将新模型上传到guvnor中没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM