AnsweredAssumed Answered

Integrating Drools with Activiti 5.14 (NoClassDefFoundError: org/drools/runtime/rule/AgendaFilter)

Question asked by johnm on Dec 4, 2014
Latest reply on Dec 8, 2014 by jbarrez
Hi All,

I'm really struggling with getting set up to use drools with Activiti 5.14. Any help..Steers.. or suggestions..would be greatly appreciated.
I've picked Drools 5.5.0.Final. First off is this the correct version to use with Activiti 5.14?

In my pom.xml I have:

<activiti-version>5.14</activiti-version>
<drools-version>5.5.0.Final</drools-version>

Drools dependenceies as follows:

<dependency>
   <groupId>org.drools</groupId>
   <artifactId>drools-core</artifactId>
   <version>${drools-version}</version>
</dependency>
<dependency>
   <groupId>org.drools</groupId>
   <artifactId>drools-compiler</artifactId>
   <version>${drools-version}</version>
</dependency>
<dependency>
   <groupId>org.drools</groupId>
   <artifactId>knowledge-api</artifactId>
   <version>${drools-version}</version>
</dependency>

What is this knowledge-api? (I added it to the pom because I could see it has org/drools/runtime/rule/AgendaFilter in it
.. however with it in, or out it does not work)

At runtime, I programmatically deploy a process as follows:

// Deploy the process definition
repositoryService.createDeployment()
   .addClasspathResource("./diagrams/FinancialReportProcess.bpmn20.xml")
   /* only the following process has a rule..*/
   .addClasspathResource("./diagrams/FinancialReportProcessWithNoddyRule.bpmn20.xml")
   .deploy();
          
Exception in thread "Thread-12" java.lang.NoClassDefFoundError: org/drools/runtime/rule/AgendaFilter
        at org.activiti.engine.impl.bpmn.parser.factory.DefaultActivityBehaviorFactory.createBusinessRuleTaskActivityBehavior(DefaultActivityBehaviorFactory.java:236)
        at org.activiti.engine.impl.bpmn.parser.handler.BusinessRuleParseHandler.executeParse(BusinessRuleParseHandler.java:37)
        at org.activiti.engine.impl.bpmn.parser.handler.BusinessRuleParseHandler.executeParse(BusinessRuleParseHandler.java:25)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler.parse(AbstractBpmnParseHandler.java:79)
        at org.activiti.engine.impl.bpmn.parser.handler.AbstractFlowNodeBpmnParseHandler.parse(AbstractFlowNodeBpmnParseHandler.java:27)

..
..

I used Activiti Eclipse BPMN 2.0 Designer   5.15.0.201407081458 to generate the bpmn20.xml.

I noticed also in one of the ant scripts around Drools (in your Ativiti in Action book ) you copy "mvel2-2.1.0.drools4.jar"
where does this come into it??

Any process's with no Drools Rules are all fine.. I can play around with them, but just cannot get to see any Drools Rules.
Any help? Steers? or suggestions..? 



Outcomes