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

(one-off)[7.11.1]Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy

XMLWordPrintable

    • Icon: Support Patch Support Patch
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.12.1.GA
    • jBPM Core
    • False
    • None
    • False
    • Hide
      PATCH NAME:
      RHPAM-4330
      PRODUCT NAME:
      Red Hat Process Automation Manager(rhpam)
      VERSION:
      7.11.1.GA
      SHORT DESCRIPTION:
            Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy
      LONG DESCRIPTION:
          One-off patch for RHPAM-4330 - Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy
          https://issues.redhat.com/browse/RHPAM-4330

      MANUAL INSTALL INSTRUCTIONS FOR ALL PLATFORMS:

      1. Backup and remove the following jars:

      $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib/jbpm-flow-7.52.0.Final-redhat-00008.jar
      $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib/jbpm-flow-7.52.0.Final-redhat-00008.jar
       
      2. Unzip the file jboss-rhpam-7.11.1-RHPAM-4330.zip and copy:

      RHPAM-4330/jbpm-flow-7.52.0.Final-redhat-00008-RHPAM-4330.jar

      to:

      $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib
      $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib


      MANUAL INSTALL INSTRUCTIONS FOR MAVEN BASED PROJECTS:

          1. Extract the attached zip (jboss-rhba-7.11.1-RHPAM-4330.zip) and goto the RHPAM-4330 directory

          2. Run the following commands to install the patch binaries to the local maven repository:
          
      mvn install:install-file -Dfile=jbpm-flow-7.52.0.Final-redhat-00008-RHPAM-4330.jar -Dsources=jbpm-flow-7.52.0.Final-redhat-00008-RHPAM-4330-sources.jar -DpomFile=jbpm-flow-7.52.0.Final-redhat-00008-RHPAM-4330.pom -Dpackaging=jar
         
          3. Override the original version of modified jars explicitly declaring them in <dependencyManagement> of your project pom.xml:

                   <dependency>
                      <groupId>org.jbpm</groupId>
                      <artifactId>jbpm-flow</artifactId>
                      <version>7.52.0.Final-redhat-00008-RHPAM-4330</version>
                   </dependency>

       
      CREATOR:
              Abhijit Humbe
      DATE:
              20-May-2022
      Show
      PATCH NAME: RHPAM-4330 PRODUCT NAME: Red Hat Process Automation Manager(rhpam) VERSION: 7.11.1.GA SHORT DESCRIPTION:       Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy LONG DESCRIPTION:     One-off patch for RHPAM-4330 - Abort fails with SessionNotFoundException for process instance with multiple REST WorkItemHandlers and RETRY strategy      https://issues.redhat.com/browse/RHPAM-4330 MANUAL INSTALL INSTRUCTIONS FOR ALL PLATFORMS: 1. Backup and remove the following jars: $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib/jbpm-flow-7.52.0.Final-redhat-00008.jar $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib/jbpm-flow-7.52.0.Final-redhat-00008.jar   2. Unzip the file jboss-rhpam-7.11.1- RHPAM-4330 .zip and copy: RHPAM-4330 /jbpm-flow-7.52.0.Final-redhat-00008- RHPAM-4330 .jar to: $SERVER_DEPLOYMENT_DIR/business-central.war/WEB-INF/lib $SERVER_DEPLOYMENT_DIR/kie-server.war/WEB-INF/lib MANUAL INSTALL INSTRUCTIONS FOR MAVEN BASED PROJECTS:     1. Extract the attached zip (jboss-rhba-7.11.1- RHPAM-4330 .zip) and goto the RHPAM-4330 directory     2. Run the following commands to install the patch binaries to the local maven repository:      mvn install:install-file -Dfile=jbpm-flow-7.52.0.Final-redhat-00008- RHPAM-4330 .jar -Dsources=jbpm-flow-7.52.0.Final-redhat-00008- RHPAM-4330 -sources.jar -DpomFile=jbpm-flow-7.52.0.Final-redhat-00008- RHPAM-4330 .pom -Dpackaging=jar         3. Override the original version of modified jars explicitly declaring them in <dependencyManagement> of your project pom.xml:              <dependency>                 <groupId>org.jbpm</groupId>                 <artifactId>jbpm-flow</artifactId>                 <version>7.52.0.Final-redhat-00008- RHPAM-4330 </version>              </dependency>   CREATOR:         Abhijit Humbe DATE:         20-May-2022
    • ---
    • ---

      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)
      

            jbn-patch-team JBN Patch Team list
            rhn-support-abhumbe Abhijit Humbe
            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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: