Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-4296

Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy

    XMLWordPrintable

Details

    • 2022 Week 17-19 (from Apr 25), 2022 Week 20-22 (from May 16), 2022 Week 23-25 (from Jun 6), 2022 Week 26-28 (from Jun 27), 2022 Week 29-31 (from Jul 18)

    Description

      Given the following conditions:

      • A process definition containing two (or more) REST WorkItemHandler nodes
      • The REST WIH is configured using an error-handling process with RETRY strategy:
        new org.jbpm.process.workitem.rest.RESTWorkItemHandler(classLoader, "ExceptionHandlingProcess", "RETRY")
        

      Executing this process in a way that the first REST execution is successful, and the second one fails leads to the retry sub-process to get executed one additional time:

      // successful REST call for WIH node#1
      processInstanceId = 1 REST (two) entry
      processInstanceId = 1 REST (two) exit
      
      // failing REST call for WIH node#2
      processInstanceId = 1 REST (two) entry
      Exception handling process called 2
      Exception handling process called 3
      Exception handling process called 4
      Exception handling process called 5
      
      // one additional execution of the error handling process
      Exception handling process called 6
      

      Attempting to abort such a process instance fails with a SessionNotFoundException:

      org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 5
      	at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager$PerProcessInstanceInitializer.initKieSession(PerProcessInstanceRuntimeManager.java:572)
      	at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.internalGetKieSession(RuntimeEngineImpl.java:163)
      	at org.jbpm.runtime.manager.impl.RuntimeEngineImpl.getKieSession(RuntimeEngineImpl.java:74)
      	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.getKieRuntimeForSubprocess(WorkItemNodeInstance.java:614)
      	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.getKieRuntimeForExceptionSubprocess(WorkItemNodeInstance.java:596)
      	at org.jbpm.workflow.instance.node.WorkItemNodeInstance.cancel(WorkItemNodeInstance.java:320)
      	at org.jbpm.workflow.instance.impl.NodeInstanceImpl.cancel(NodeInstanceImpl.java:161)
      	at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:452)
      	at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:497)
      	at org.jbpm.process.instance.ProcessRuntimeImpl.abortProcessInstance(ProcessRuntimeImpl.java:575)
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-egonzale Enrique Gonzalez Martinez (Inactive)
              rhn-support-mputz Martin Weiler (Inactive)
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: