4 Replies Latest reply on Aug 2, 2015 1:12 PM by Moritz Becker

    Rule deployment in jBPM console 6.2.0.Final

    Moritz Becker Newbie

      Hi,

       

      I created a Drools rule according to

      https://developer.jboss.org/thread/160507?tstart=120

      in order to trigger a process periodically. The .drl file is packaged in the same kjar as the process.

       

      The .drl contains the following:

       

      import org.drools.core.spi.ProcessContext

       

      rule "everyDay" ruleflow-group "productSync"

          timer (cron:0 0 23 ? * FRI)

        when

        

        then

            kcontext.getKnowledgeRuntime().startProcess("com.bpm.process.productSyncMaster");

      end

       

      My problem is that I do not know how to actually deploy the rule in jBPM console.

      I can see the deployed kjar in Deploy > Process Deployments but nothing is displayed in Deploy > Rule Deployments.

       

      In Deploy > Rule Deployments I can only register some server (as shown in the screenshot below) but I could not find any further information on this in the reference.

       

      Thank you for your help.

        • 1. Re: Rule deployment in jBPM console 6.2.0.Final
          Moritz Becker Newbie

          The .drl file is in a different package than the .bpmn process definitions. I noticed that I have to declare both packages in kmodule.xml which now looks like this (I guess I could also write com.bpm.*):

          <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">

           

              <kbase name="kbase" packages="com.bpm.process,com.bpm.rule" default="true">

                  <ksession name="kbase-session" default="true" />

              </kbase>

           

          </kmodule>


          However, the deployment fails now with the following exception:

          07:57:32,106 WARN  [org.jbpm.kie.services.impl.KModuleDeploymentService] (default task-37) Unexpected error while deploying unit com.me:batch-bpm-process:1.0.0-SNAPSHOT:kbase:kbase-session: java.lang.RuntimeException: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

              at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:159) [jbpm-kie-services-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:152) [jbpm-kie-services-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(Unknown Source) [jbpm-services-cdi-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:179) [jbpm-console-ng-business-domain-backend-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.deploy(DeploymentManagerEntryPointImpl.java:143) [jbpm-console-ng-business-domain-backend-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.deploy(Unknown Source) [jbpm-console-ng-business-domain-backend-6.2.0.Final.jar:6.2.0.Final]

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_45]

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_45]

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_45]

              at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_45]

              at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.io.VoidRPCEndpointCallback.callback(VoidRPCEndpointCallback.java:20) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:396) [errai-weld-integration-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:293) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:97) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:114) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:142) [errai-bus-3.0.4.Final.jar:3.0.4.Final]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]

              at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:53) [uberfire-servlet-security-0.5.0.Final.jar:0.5.0.Final]

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:64) [uberfire-servlet-security-0.5.0.Final.jar:0.5.0.Final]

              at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:27) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)[undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

           

              at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_45]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_45]

          Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

              at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:185) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:70) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newKieSession(KnowledgeStoreServiceImpl.java:39) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.kie.internal.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:121) [kie-internal-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.runtime.manager.impl.factory.JPASessionFactory.newKieSession(JPASessionFactory.java:42) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.runtime.manager.impl.SingletonRuntimeManager.init(SingletonRuntimeManager.java:98) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newSingletonRuntimeManager(RuntimeManagerFactoryImpl.java:64) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.services.cdi.impl.manager.RuntimeManagerFactoryCDIImpl$Proxy$_$$_WeldClientProxy.newSingletonRuntimeManager(Unknown Source) [jbpm-services-cdi-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.kie.services.impl.AbstractDeploymentService.commonDeploy(AbstractDeploymentService.java:133) [jbpm-kie-services-6.2.0.Final.jar:6.2.0.Final]

              ... 58 more

          Caused by: java.lang.reflect.InvocationTargetException

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_45]

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_45]

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_45]

              at java.lang.reflect.Constructor.newInstance(Constructor.java:422) [rt.jar:1.8.0_45]

              at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:171) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              ... 66 more

          Caused by: java.lang.RuntimeException: Unable to commit transaction

              at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:229) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:107) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              ... 71 more

          Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1178)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)

              at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)

              at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:173)

              at org.drools.persistence.jta.JtaTransactionManager.commit(JtaTransactionManager.java:226) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              ... 72 more

          Caused by: java.lang.NullPointerException

              at org.jbpm.runtime.manager.impl.tx.TransactionAwareSchedulerServiceInterceptor.getEnvironment(TransactionAwareSchedulerServiceInterceptor.java:145) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.runtime.manager.impl.tx.TransactionAwareSchedulerServiceInterceptor.getTransactionManager(TransactionAwareSchedulerServiceInterceptor.java:124) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.runtime.manager.impl.tx.TransactionAwareSchedulerServiceInterceptor.internalSchedule(TransactionAwareSchedulerServiceInterceptor.java:65) [jbpm-runtime-manager-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.process.core.timer.impl.ThreadPoolSchedulerService.scheduleJob(ThreadPoolSchedulerService.java:109) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.process.core.timer.impl.GlobalTimerService.scheduleJob(GlobalTimerService.java:100) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]

              at org.jbpm.process.core.timer.impl.RegisteredTimerServiceDelegate.scheduleJob(RegisteredTimerServiceDelegate.java:65) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.PhreakTimerNode.scheduleTimer(PhreakTimerNode.java:314) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.PhreakTimerNode.scheduleLeftTuple(PhreakTimerNode.java:236) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.PhreakTimerNode.doLeftInserts(PhreakTimerNode.java:96) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:71) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:231) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:221) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.evaluateRuleActivations(ProtobufOutputMarshaller.java:275) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.serializeSession(ProtobufOutputMarshaller.java:142) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.marshalling.impl.ProtobufOutputMarshaller.writeSession(ProtobufOutputMarshaller.java:120) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:155) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.core.marshalling.impl.ProtobufMarshaller.marshall(ProtobufMarshaller.java:140) [drools-core-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.SessionMarshallingHelper.getSnapshot(SessionMarshallingHelper.java:64) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.info.SessionInfo.transform(SessionInfo.java:81) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.TriggerUpdateTransactionSynchronization.beforeCompletion(TriggerUpdateTransactionSynchronization.java:42) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at org.drools.persistence.jta.JtaTransactionSynchronizationAdapter.beforeCompletion(JtaTransactionSynchronizationAdapter.java:39) [drools-persistence-jpa-6.2.0.Final.jar:6.2.0.Final]

              at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:358)

              at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:91)

              at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)

              at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1166)

              ... 76 more

               [exec]

           

          So it looks like the jbpm-console fails evaluating the rule hence there must be some error in the rule. Do you know what the problem is?

          Apart from that: Is there a better way in jBPM 6 to schedule a process periodically? Maybe a job?

          • 2. Re: Rule deployment in jBPM console 6.2.0.Final
            Kris Verlaenen Master

            Rules can be deployed alongside processes in a kjar (as you managed to fix already it seems).

             

            In this case however, the rule you have written is using a rule timer, which doesn't work well with the jBPM execution server (the reason is that jBPM execution server is configured with persistence and rule timers don't start a new transaction).  I'd suggest to try and model it slightly different:

            - you can use a timer start event to start a process at regular intervals (this will use a process timer which should work fine)

            - if you want to keep the timer logic outside of the process, you can use the job executor to schedule a recurring job

             

            Kris

            • 3. Re: Rule deployment in jBPM console 6.2.0.Final
              Moritz Becker Newbie

              Thank you. I ended up creating a separate process with a timer that calls the main process.

              However, the timer process has to be started manually each time the jBPM console boots up, right? Is there a way to start this process automatically on startup?

              • 4. Re: Rule deployment in jBPM console 6.2.0.Final
                Moritz Becker Newbie

                I encountered the following problems with the approach of using a separate process containing a timer which calls the sub process:

                1. I was able to configure the timer as desired using the ISO 8601 syntax for repeating intervals. However, as soon as the interval start time was in the past, the sub process was triggered immediately. So I would have had to configure the interval with the start time of the next desired sub process execution and I could not figure out how to include this dynamic property to the timer configuration.
                2. The approach requires the timer process to be started manually each time the jBPM console is restarted or the process is redeployed.

                 

                Therefore I ended up with this solution:

                I am using an EJB Timer packaged with the jBPM console that triggers the process periodically if deployed:

                 

                @javax.ejb.Singleton

                public class ProcessTimer {

                 

                    @Inject

                    private DeploymentService deploymentService;

                  

                    @Schedule(hour="4", minute="0", persistent=false)

                    public void startTimerProcess(){

                        RuntimeManager runtimeManager = deploymentService.getRuntimeManager("com.test:my-process:1.0.0-SNAPSHOT");

                        if(runtimeManager != null){

                            KieSession kieSession = runtimeManager.getRuntimeEngine(EmptyContext.get()).getKieSession();

                            kieSession.startProcess("com.test.process");

                        }

                    }

                }