drools

How to write Drool rules in Excel sheet?

混江龙づ霸主 提交于 2019-12-23 02:25:13
问题 Can we write Drool rules in Excel sheet? Can rules be used for simple human readable content? If we can then how it can be done? Please explain. 回答1: Yes you can. How about reading the section of the user guide called "Decision Tables in Spreadsheets"? http://docs.jboss.org/drools/release/5.5.0.Final/drools-expert-docs/html_single/#d0e1157 回答2: It is better to start with sample rules excel generated using Eclipse Drools Plugin. It gives many things already set up. Just change the data inside

Exception Child services have no parent when starting Optaplanner application

旧时模样 提交于 2019-12-22 18:14:14
问题 I have a test program that uses optaplanner. There is no direct use of KIE API's but it looks like they are being invoked behind the scenes. This may be related to the fact that I am using DROOLS for the score calculation. The program works from the IDE or through maven, but I want to create a standalone jar that will not require maven. I used the maven assembly plugin to build a fat jar with all dependencies included to be run standalone. When I run java -jar target/OptaPlannerTest-1.4

drools programmatically generate a fact model

霸气de小男生 提交于 2019-12-22 12:38:12
问题 I need to generate an enormous fact model using an ontology external to drools. Now, I could certainly write a script/program to pull this off. My approach would be to generate a java bean for each ontology class which contains the appropriate fields, methods, and references to other java objects based on ontological relationships (probably in a map). My question is whether drools has a more elegant way to approach this problem. I figure it must be a common problem that the fact model is

drools programmatically generate a fact model

半腔热情 提交于 2019-12-22 12:38:10
问题 I need to generate an enormous fact model using an ontology external to drools. Now, I could certainly write a script/program to pull this off. My approach would be to generate a java bean for each ontology class which contains the appropriate fields, methods, and references to other java objects based on ontological relationships (probably in a map). My question is whether drools has a more elegant way to approach this problem. I figure it must be a common problem that the fact model is

Drools Rules Template - first invocation 1000 times slower than subsequence invocations

混江龙づ霸主 提交于 2019-12-22 01:48:20
问题 I have built a Drools Rules Template using Drools 6.4.0.Final It is pretty much identical to the example provided here. I have wrapped it in a Spring RestController and deployed it as a WAR in to Tomcat . I notice that the first call is always very slow to get a result and gets slower as the number of rows in the xls spreadsheet grows. I imagine drools builds an index when the first ever KieSession is created. And that this index is subsequently cached making further calls much faster? I see

Drools JBOSS rule Nested IF's

六眼飞鱼酱① 提交于 2019-12-22 01:15:49
问题 I am a newbie with Jboss Rule. I have gone through the documentation but I fail to find the approach to begin writing rule for following code sample. For each User code in the list { If User code = ‘11’ { If User code ‘17’ present in the group { Add letter id 1 } Else If User code ‘18’ present in the group { Add letter id 2 } } Else { Add letter id 3 which is the letter need to be sent for code 11 } } I would really appreciate if anyone can give me a hint/idea how to go about it? EDIT: Hi, So

to check if an Object is present in List in Drools

浪尽此生 提交于 2019-12-21 21:12:12
问题 I am newbie in Drools and given the work to write rule files i.e. drl files. I am facing one issue. The operator contains is used to check whether a field that is a Collection or array contains the specified value. Object( objList contains "bye" ) -- to verify if "bye' is there in objList or not i.e. for verifying String. But, I have List of Objects and want to check if List contains any particular Object or not so I used the above replacing String with an object but that didn't work.' Can

How to dynamically change the rules of a given Drools 6.3 session?

偶尔善良 提交于 2019-12-21 17:51:41
问题 I have a session in Drools 6.3.x containing e few million facts. I'm building an interactive application that, among other things, allows the user to filter the facts as he wants. In my mind, this filter is basically a pattern. Once the facts are filtered, the logic is applied to produce the desired result. Due to the interactive nature of the application, I'd rather not to wait for the user input to build a KieBase , derive a KieSession , load the few million facts and fire the rules all the

Drools disable a rule at runtime

☆樱花仙子☆ 提交于 2019-12-21 09:25:12
问题 I'm starting a project whith Drools and Drools Guvnor. My rules are deployed in drools guvnor. My rule engine instance can access those rules via the pkg file exposed by drools Guvnor when you do a package release build and release. This is all working fine, what I'm looking for is a solution for disabling a rule at runtime. The only solution I have right now is to go to guvnor, archive the rule and do a build + release of the package containing that rule. Isn't there another strategy ? 回答1:

Drools 6.4 KieScanner : How create and add Jar with rules in Maven?

会有一股神秘感。 提交于 2019-12-21 06:25:26
问题 I am a beginner with Drools and Maven and I am facing a problem to load rules with KieScanner. The aim of the project is to be able to dynamically load rules in a permanent KieSession. I wonder if it is possible to manage rules with the KieFileSystem (not sure it is possible without a dispose of the session and starting another one leading to the lack of the previous inserted facts), but the good way is to use KieScanner. It seems this requires the creation of a Jar containing the rules and