jboss-rules

How can we share individual rules between .drl files in JBoss Rules?

不羁的心 提交于 2019-12-23 17:14:54
问题 We are using JBoss Rules (a.k.a. Drools) and have several .drl files that each contain several rules. Is there a way to avoid duplication between files, so that we can define common rules that are available to more than one .drl file? Unfortunately, there does not seem to be any kind of include or module facility. 回答1: There is no way of including rules from another .drl file from within a .drl file. You can however add two .drl files to the same ruleBase and they will work as if they were in

Drools testing with junit

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 07:53:35
问题 What is the best practice to test drools rules with junit? Until now we used junit with dbunit to test rules. We had sample data that was put to hsqldb. We had couple of rule packages and by the end of the project it is very hard to make a good test input to test certain rules and not fire others. So the exact question is that how can I limit tests in junit to one or more certain rule(s) for testing? 回答1: Personally I use unit tests to test isolated rules. I don't think there is anything too

Drools testing with junit

大兔子大兔子 提交于 2019-12-03 12:06:01
What is the best practice to test drools rules with junit? Until now we used junit with dbunit to test rules. We had sample data that was put to hsqldb. We had couple of rule packages and by the end of the project it is very hard to make a good test input to test certain rules and not fire others. So the exact question is that how can I limit tests in junit to one or more certain rule(s) for testing? Personally I use unit tests to test isolated rules. I don't think there is anything too wrong with it, as long as you don't fall into a false sense of security that your knowledge base is working