AnsweredAssumed Answered

How to configure Drools in Activiti-Explorer 5.20 ?

Question asked by kishorechalla on May 9, 2016
Latest reply on May 24, 2016 by kishorechalla
Hi All,
I going crazy on this, how to configure into activiti-explorer? I have done the following:
placed Drools-Core, Drools-Compiler, Knowledge-Api (all are 5.5.0-final version) and mvel-2.1-Drools16 jars into C:\Program Files\apache-tomcat-7.0.69\webapps\activiti-explorer\WEB-INF\lib

now all the posts and activiti in action book says that we need to add the following code snippet in applicationContext.xml present in WEB-INF folder.

<beans>
          <bean id="processEngineConfiguration"
class="org.activiti.engine.impl.cfg.
➥ StandaloneInMemProcessEngineConfiguration">
            <property name="databaseSchemaUpdate" value="true" />
            <property name="customPostDeployers">
             <list>
              <bean class="org.activiti.engine.impl.rules.RulesDeployer" />
             </list>
            </property>
          </bean>
        </beans>

but there no applicationContext.xml file for 5.20 version.

So I have added below piece to processEngineConfiguration bean present in activiti-custom-context.xml
<property name="customPostDeployers">
             <list>
              <bean class="org.activiti.engine.impl.rules.RulesDeployer" />
             </list>
            </property>

Now when I try to upload .bar file through activiti-explorer (browser) I am getting below error.
SEVERE: Servlet.service() for servlet [Vaadin Application Servlet] in context with path [/activiti-explorer] threw exception [java.lang.NoClassDefFoundError: org/kie/internal/builder/KnowledgeBuilderConfiguration] with root cause
java.lang.ClassNotFoundException: org.kie.internal.builder.KnowledgeBuilderConfiguration
   at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
   at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:264)
   at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.newInstance(ServiceRegistryImpl.java:198)
   at org.drools.util.ServiceRegistryImpl$ReflectionInstantiator.call(ServiceRegistryImpl.java:193)
   at org.drools.util.ServiceRegistryImpl.get(ServiceRegistryImpl.java:150)
   at org.drools.builder.KnowledgeBuilderFactory.loadServiceFactory(KnowledgeBuilderFactory.java:130)
   at org.drools.builder.KnowledgeBuilderFactory.getKnowledgeBuilderServiceFactory(KnowledgeBuilderFactory.java:124)
   at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:46)
   at org.activiti.engine.impl.rules.RulesDeployer.deploy(RulesDeployer.java:54)
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:58)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:106)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:37)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:79)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:156)
   at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.deployUploadedFile(DeploymentUploadReceiver.java:96)
   at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.uploadFinished(DeploymentUploadReceiver.java:71)
   at org.activiti.explorer.ui.custom.UploadComponent.uploadFinished(UploadComponent.java:197)
   at org.activiti.explorer.ui.custom.UploadComponent$1.streamingFinished(UploadComponent.java:222)
   at com.vaadin.ui.DragAndDropWrapper$ProxyReceiver.streamingFinished(DragAndDropWrapper.java:332)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.streamToReceiver(AbstractCommunicationManager.java:600)
   at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleXhrFilePost(AbstractCommunicationManager.java:520)
   at com.vaadin.terminal.gwt.server.CommunicationManager.handleFileUpload(CommunicationManager.java:267)
   at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:495)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.activiti.explorer.filter.ExplorerFilter.doFilter(ExplorerFilter.java:53)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
   at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
   at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
   at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)

this is very strange as it is looking for jboss kie jar.

And if I don't add customPostDeployers property to activiti-custom-context.xml, I get "deployment XXXX does not contain any rules." which is obvious as I did not configure drools.

below is my bar file..
https://drive.google.com/open?id=0B7g4ykqRYTxtUTlLT0dYV0pCTUk

Can any one please help on this. Any help is greatly appreciated. Thanks in advance.

Outcomes