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

RETRY handlingStrategy should handle exception multiple times while handling exception via subprocess

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.4.0.GA
    • 7.2.1.GA
    • jBPM Core
    • 2019 Week 20-22

      I have a case where customer is trying to handle exception of WorkIteamHandler(RESTWorkItemHandler) by defining "handlingProcessId" and "handlingStrategy", like as:

      ~~~
      new org.jbpm.process.workitem.rest.RESTWorkItemHandler("bpmsAdmin","admin1",classLoader, "DealWithException","RETRY")
      ~~~
      This approach works fine when we use 'COMPLETE' and 'ABORT' handlingStrategy. With 'RETRY' strategy I am expecting when exception occurs subprocess handle it and after completion of subprocess 'Rest' service task will be triggered agaig and new suprocess will be started to handle the "new" exception. But actually subprocess is called only once and on 2nd attempt Rest task throws exception.

            [RHPAM-2024] RETRY handlingStrategy should handle exception multiple times while handling exception via subprocess

            Marked as Closed for all verified/Release pending issues

            Marek Novotny added a comment - Marked as Closed for all verified/Release pending issues

            Verified with 7.4.0.CR1.

            Marian Macik added a comment - Verified with 7.4.0.CR1.

            We should not close any issue, just Resolve, QE needs to verify it before closing.

            Marek Novotny added a comment - We should not close any issue, just Resolve, QE needs to verify it before closing.

            manaRH this does not have th pm ack but it is already merged

            Enrique González Martínez (Inactive) added a comment - manaRH this does not have th pm ack but it is already merged

            Note: It will be need to be backward compatible, We need to bound the numbers of retries in some way (probably a system property or sort of)

            Enrique González Martínez (Inactive) added a comment - Note: It will be need to be backward compatible, We need to bound the numbers of retries in some way (probably a system property or sort of)

            During normal execution an error is always handled by the strategy

            https://github.com/kiegroup/jbpm/blob/7.20.0.Final/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/WorkItemNodeInstance.java#L157

            but it does not happen the same when you are dealing with the RETRY causing to fail the node:

            https://github.com/kiegroup/jbpm/blob/7.20.0.Final/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/WorkItemNodeInstance.java#L624

            Seems a global problem of every work item handlers from my point of view.

            Enrique González Martínez (Inactive) added a comment - During normal execution an error is always handled by the strategy https://github.com/kiegroup/jbpm/blob/7.20.0.Final/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/WorkItemNodeInstance.java#L157 but it does not happen the same when you are dealing with the RETRY causing to fail the node: https://github.com/kiegroup/jbpm/blob/7.20.0.Final/jbpm-flow/src/main/java/org/jbpm/workflow/instance/node/WorkItemNodeInstance.java#L624 Seems a global problem of every work item handlers from my point of view.

              elguardian@gmail.com Enrique González Martínez (Inactive)
              rhn-support-abhumbe Abhijit Humbe (Inactive)
              Marian Macik Marian Macik
              Marian Macik Marian Macik
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: