10 Replies Latest reply on Jun 26, 2014 2:14 AM by Jeewani Lakshani

    Inclusive gateway with a DRL (drools business rule)

    Jeewani Lakshani Newbie

      Hi all,

      I am trying to implement the following process using JBPM 6. But when i create a business rule and add it with an inclusive gateway the process does not work.  my scenario is as follows. Please assist me. Thank u in advance.

       

      There are two user tasks (IT Task and Admin Task). computer and laptop (Boolean) variables are assigned to IT and table and chair (Boolean) assigned to Admin. the process diagram and the DRL rule file is as follows.

       

      import org.jbpm.capex.Capex

      rule "set as admin_task" ruleflow-group "requestrule"

      no-loop

      when

        $p : Capex( table == true ) || $p :Capex( chair == true )

      then

        modify($p) {

        setAdmin_item(true);

        }

      end

      rule "set as it_task" ruleflow-group "requestrule"

      no-loop

      when

        $p : Capex( computer_pc == true) || $p :Capex( laptop == true)

      then

        modify($p) {

        setIt_item(true);

        }

      end

       

       

      and the conditions for the two drools directions are "return Capex.getIt_item()==true;" and "return Capex.getAdmin_item()==true;" and my variable is "Capex"

      ruletask.jpg

        • 1. Re: Inclusive gateway with a DRL (drools business rule)
          Jeewani Lakshani Newbie

          Appreciate very much if someone help me out with this as i am stuck with my business process.

          • 2. Re: Inclusive gateway with a DRL (drools business rule)
            Maciej Swiderski Master

            could you please attach your process bpmn2 xml and the capex class so it might be checked?

            • 3. Re: Re: Inclusive gateway with a DRL (drools business rule)
              Jeewani Lakshani Newbie

              here i have attached my bpmn2 xml and drl files along with my capex class.  Seek your assistance to resolve my problem.Thank u very much.

              • 4. Re: Inclusive gateway with a DRL (drools business rule)
                Jeewani Lakshani Newbie

                Hi,

                i think the above attachment would help to get an idea about my process. Actually when i try it without a business rule task the inclusive gateway works.  but when i add it to a business rule task along with DRL file it doesn't work . Appreciate very much if you can provide me a solution in order to complete my business process.

                • 5. Re: Re: Inclusive gateway with a DRL (drools business rule)
                  Maciej Swiderski Master

                  alright, the problem is caused by the rule that is keep firing itself and thus not moving forward. I modified the rules (define rule) and process worked as expected.

                   

                  here is the modified rule - added additional condition to exclude another evaluation if the flag has already been set:

                  import org.jbpm.capex.Capex
                  
                  
                  rule "set as it_item" ruleflow-group "definerule"
                  no-loop
                  when
                    ($p: Capex(computer== true, it_item == false) )
                  then
                    modify($p) {
                    setIt_item(true);        
                    }
                  end
                  
                  
                  rule "set as admin_item" ruleflow-group "definerule"
                  no-loop
                  when
                    ($p: Capex(table== true, admin_item == false) )
                  then
                    modify($p) {
                    setAdmin_item(true);         
                    }
                  end
                  

                  HTH

                  1 of 1 people found this helpful
                  • 6. Re: Inclusive gateway with a DRL (drools business rule)
                    Jeewani Lakshani Newbie

                    I implement it as above.  But it didn't work and got the following error.

                     

                    Task failed to complete: [capex.capexform:505 - Item Definition Rule (2):9] -- Unexpected exception executing action org.jbpm.process.instance.event.DefaultSignalManager$SignalAction@7d26fce2

                     

                    09:48:38,003 WARN  [org.jbpm.services.task.persistence.TaskTransactionInterceptor] (http-jboss-jbpm.lolc.com/192.168.255.150:8080-17) Could not commit session: org.jbpm.workflow.instance.WorkflowRuntimeException: [capex.capexform:504 - Item Definition Rule (2):9] -- Unexpected exception executing action org.jbpm.process.instance.event.DefaultSignalManager$SignalAction@10266d26

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:161) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:44) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:286) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:265) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:275) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:93) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:313) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:399) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:134) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:74) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:35) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:527) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:375) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession$1.completeWorkItem(CommandBasedStatefulKnowledgeSession.java:147) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.wih.ExternalTaskEventListener.processTaskState(ExternalTaskEventListener.java:75) [jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.wih.ExternalTaskEventListener.afterTaskCompletedEvent(ExternalTaskEventListener.java:119) [jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskCompleted(TaskEventSupport.java:189) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.internals.lifecycle.MVELLifeCycleManager.taskOperation(MVELLifeCycleManager.java:336) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.identity.UserGroupLifeCycleManagerDecorator.taskOperation(UserGroupLifeCycleManagerDecorator.java:46) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.impl.TaskInstanceServiceImpl.complete(TaskInstanceServiceImpl.java:138) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.commands.CompleteTaskCommand.execute(CompleteTaskCommand.java:70) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.commands.CompleteTaskCommand.execute(CompleteTaskCommand.java:37) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.commands.CompositeCommand.execute(CompositeCommand.java:38) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.services.task.impl.command.CommandBasedTaskService.complete(CommandBasedTaskService.java:144) [jbpm-human-task-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl.complete(TaskServiceEntryPointImpl.java:312) [jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.console.ng.ht.backend.server.TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.complete(TaskServiceEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl.completeTaskFromContext(FormModelerProcessStarterEntryPointImpl.java:63) [jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.completeTaskFromContext(FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.java) [jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]

                        at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]

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

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

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

                        at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499) [errai-weld-integration-2.4.3.Final.jar:2.4.3.Final]

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

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

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

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

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

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

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar:1.0.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65) [solder-impl-3.2.1.Final.jar:3.2.1.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74) [solder-impl-3.2.1.Final.jar:3.2.1.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70) [jbpm-designer-backend-6.0.1.Final.jar:6.0.1.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266) [uberfire-security-server-0.3.1.Final.jar:0.3.1.Final]

                        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                        at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:499) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]

                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920) [jbossweb-7.2.2.Final-redhat-1.jar:7.2.2.Final-redhat-1]

                        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]

                    Caused by: org.drools.core.RuntimeDroolsException: Unexpected exception executing action org.jbpm.process.instance.event.DefaultSignalManager$SignalAction@10266d26

                        at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1246) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.impl.StatefulKnowledgeSessionImpl.executeQueuedActions(StatefulKnowledgeSessionImpl.java:892) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.process.instance.event.DefaultSignalManager.signalEvent(DefaultSignalManager.java:73) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.persistence.processinstance.JPASignalManager.signalEvent(JPASignalManager.java:37) [jbpm-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.process.instance.ProcessRuntimeImpl$3.afterRuleFlowGroupDeactivated(ProcessRuntimeImpl.java:416) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.impl.StatefulKnowledgeSessionImpl$AgendaEventListenerWrapper.afterRuleFlowGroupDeactivated(StatefulKnowledgeSessionImpl.java:723) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.event.AgendaEventSupport.fireAfterRuleFlowGroupDeactivated(AgendaEventSupport.java:168) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.innerDeactiveRuleFlowGroup(DefaultAgenda.java:700) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.getNextFocus(DefaultAgenda.java:525) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:924) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:106) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:527) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:375) [drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:258) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.process.instance.event.listeners.TriggerRulesEventListener.afterRuleFlowGroupActivated(TriggerRulesEventListener.java:84) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.impl.StatefulKnowledgeSessionImpl$AgendaEventListenerWrapper.afterRuleFlowGroupActivated(StatefulKnowledgeSessionImpl.java:717) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.event.AgendaEventSupport.fireAfterRuleFlowGroupActivated(AgendaEventSupport.java:137) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.activateRuleFlowGroup(DefaultAgenda.java:677) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.DefaultAgenda.activateRuleFlowGroup(DefaultAgenda.java:665) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.runtime.rule.impl.AgendaImpl.activateRuleFlowGroup(AgendaImpl.java:74) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.RuleSetNodeInstance.internalTrigger(RuleSetNodeInstance.java:79) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        ... 82 more

                    Caused by: org.jbpm.workflow.instance.WorkflowRuntimeException: [capex.capexform:504 - :14] -- unable to execute ReturnValueEvaluator:

                        at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:67) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:44) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:286) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:265) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.RuleSetNodeInstance.signalEvent(RuleSetNodeInstance.java:116) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:405) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.process.instance.event.DefaultSignalManager.internalSignalEvent(DefaultSignalManager.java:81) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.process.instance.event.DefaultSignalManager$SignalAction.execute(DefaultSignalManager.java:181) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.drools.core.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1244) [drools-core-6.0.1.Final.jar:6.0.1.Final]

                        ... 112 more

                    Caused by: java.lang.RuntimeException: unable to execute ReturnValueEvaluator:

                        at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:131) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.SplitInstance.executeStrategy(SplitInstance.java:145) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        at org.jbpm.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:63) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        ... 123 more

                    Caused by: java.lang.NullPointerException

                        at org.jbpm.Process_org$u46$jbpm$u46$capexform228977760.returnValueEvaluator4(Process_org$u46$jbpm$u46$capexform228977760.java:33)

                        at org.jbpm.Process_org$u46$jbpm$u46$capexform228977760ReturnValueEvaluator4Invoker.evaluate(Process_org$u46$jbpm$u46$capexform228977760ReturnValueEvaluator4Invoker.java:15)

                        at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:129) [jbpm-flow-6.0.1.Final.jar:6.0.1.Final]

                        ... 125 more

                    • 7. Re: Inclusive gateway with a DRL (drools business rule)
                      Maciej Swiderski Master

                      check you condition definition on outgoing sequence flows of OR gateway as we can clearly see that rule task was completed successfully and diverging gateway is evaluating conditions which failed due to some missing data. I tried with you example but had to modify the conditions as well as they were mixing KieFunctions with script - just use pure script expression there like return Capex.getIt_Item() == true; and you should be fine.

                       

                      HTH

                      • 8. Re: Inclusive gateway with a DRL (drools business rule)
                        Jeewani Lakshani Newbie

                        i performed my business process as per your guidance. but i still get the same error   i don't know what is the cause of this issue.  please help

                        Caused by: java.lang.NullPointerException

                          at org.jbpm.Process_org$u46$jbpm$u46$person11574393315.returnValueEvaluator1(Process_org$u46$jbpm$u46$person11574393315.java:15)

                          at org.jbpm.Process_org$u46$jbpm$u46$person11574393315ReturnValueEvaluator1Invoker.evaluate(Process_org$u46$jbpm$u46$person11574393315ReturnValueEvaluator1Invoker.java:15)

                          at org.jbpm.process.instance.impl.ReturnValueConstraintEvaluator.evaluate(ReturnValueConstraintEvaluator.java:129) [jbpm-flow-6.1.0.CR1.jar:6.1.0.CR1]

                          ... 127 more

                        • 9. Re: Re: Inclusive gateway with a DRL (drools business rule)
                          Jeewani Lakshani Newbie

                          And also i have attached my bpmn2 xml and drl files along with my capex class for your kind perusal.  Appreciate very much your kind response.

                          Thank u in advance

                          • 10. Re: Inclusive gateway with a DRL (drools business rule)
                            Jeewani Lakshani Newbie

                            Hi,

                            i found the answer my self. i changed my rule and then it worked as it expected.  Thank u very much for your guidance and prompt response.