drools

Problems building Drools 4 project in Eclipse

ε祈祈猫儿з 提交于 2019-12-12 18:47:00
问题 I'm having trouble compiling a drools 4 project. I'm getting errors in the rules file saying Only a type can be imported. <<MyClassName>> resolves to a package The incremental compiler isn't working because of this. How do I fix the errors or get eclipse to ignore them? 回答1: This issue was mentioned for a migration from drools 3.06 to 4.0.7, so what version of eclipse and drools are you using? This might be related to a classpath issue: Using the debugger I realized that the Drools

Drools Java 7 support in Eclipse

六月ゝ 毕业季﹏ 提交于 2019-12-12 18:24:02
问题 I created a Drools project in Eclipse (Indigo) configured to use JRE 1.7. But I get an error pointing to my .drl file: com/sample/DroolsTest$Message : Unsupported major.minor version 51.0 The com.sample.DroolsTest.Message class is imported by the .drl file. The Drools runtime was 5.2.1 (also tried with 5.3.0.Final). Any help would be appreciated. Thanks. 回答1: This exception doesn't seem to have to do anything with Drools in particular, but is a generic Java error. It occurs if you try to

Drools rule implementation

落爺英雄遲暮 提交于 2019-12-12 13:33:04
问题 I have a rule that I do not know if it is possible to implement in drools. The description: A , L , P are all facts/POJOs which are connected. I need to find out if each A can be assigned to a free P through L . And if not, how many A elements are left unassigned. In the case above one A will be left unassigned. I thought up an algorithm that is simple to describe: Find A with least edges If A has no edges, increase result counter by 1, remove A Choose random L -> P from that A and remove the

Checking if an object of a list has some value with drools

只愿长相守 提交于 2019-12-12 12:37:59
问题 I have some problems checking if an object of a list has a value with drools. My model is this class Products{ private List<Approver> approvalPath; } class Approver{ private String employeeName; } So, I need to make a rule like this rule "member" when //approvalPath has an approver with name "Charles" (for example) then //do something end How can I do it? 回答1: Here are two versions. when $app: Approver( employeeName == "Charles" ) Products( approvalPath contains $pp ) And: when Products( $ap:

Drools 6 sisu-guava conflicts with guava

不打扰是莪最后的温柔 提交于 2019-12-12 12:23:10
问题 We have recently upgraded from Drools 5 to Drools 6 and have run into disturbing conflict issues. We have kie-ci imported into out project. kie-ci brings in sisu-guava . sisu-guava changes the accessibility of some of the classes from google's guava. Unfortunately, it uses the same package name as google's guava. Since we're working with google's guava in our project, we are running into conflicts of classes. An attempt to remove sisu-guava from the project (using a maven exclusion) results

Drools: Why stateless sessions?

我是研究僧i 提交于 2019-12-12 09:01:08
问题 Drools uses sessions to store runtime data. For this purpose there are two kinds of sessions: stateless and stateful. In contrast to stateless sessions, stateful sessions allow iterative invocation and seem to have all advantages over stateless sessions. So why are there even stateless sessions? What is the purpose they serve? And what are their advantage over stateful sessions? Thank you. 回答1: As for many other general stateless scenarios, a Drools stateless session could be helpful for

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

how i deploy kie-drools-wb 6.2.0 with tomcat7?

▼魔方 西西 提交于 2019-12-12 06:06:00
问题 I follow bellow link but not success to integrate kie-drools-wb 6.2.0 with Tomcat-7. can anyone help me to resolve my problem? visit http://www.tagwith.com/question_505795_setup-drools-kie-execution-server-credentials 回答1: Better to follow this document.This will give you a clear idea regarding to the installation of the KIE workbench installation along with the tomcat. http://blog.athico.com/2014/04/deploying-kie-drools-wb-on-tomcat.html 回答2: Here's what i did. I deployed the "kie-drools-wb

Drools 6.1.0 DefaultFactHandle NotSerializable exception

纵饮孤独 提交于 2019-12-12 05:48:20
问题 We are running drools 6.1.0 on Weblogic 12.1.2 as a stateless EJB 3.0 Bean. The bean returns the following exception when there is more load on the server during the initialization process when it is creating new instances in the pool. EJB Exception: : java.lang.RuntimeException: java.io.NotSerializableException: org.drools.core.common.DefaultFactHandle at org.drools.core.util.ClassUtils.deepClone(ClassUtils.java:514) at org.drools.core.definitions.impl.KnowledgePackageImpl

JBPM - Catch Intermediate Signal fails sometime

五迷三道 提交于 2019-12-12 05:42:31
问题 I have added "Signal Intermediate Event" to a human-task as a boundary-event as I have given in previous question. Sometimes the signal is processed successfully and sometimes it is NOT . JBPM runtime just updates the process-instance-info and doesn't process the signal. I am using StatefulKnowledgeSession.signalEvent() , it is just updating the ProcessInstanceInfo at the backend and the event doesn't cancel the current activity in progress What could be the problem ? Any bug related to this