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

Stackoverflow error on RESTWorkItemHandler

    XMLWordPrintable

Details

    • False
    • False
    • Undefined
    • Hide

      1. Import this project on BC

      https://github.com/rafaeltuelho/process-servicecall-exception-handling

       

      2. Build and deploy

      Test with:

       curl --location --request POST 'http://localhost:8080/kie-server/services/rest/server/containers/kie-process-template/processes/ServiceCall/instances' \
       --header 'Content-Type: application/json' \
       --header 'Authorization: Basic <base64 credentials>' \
       --data-raw '{
       "serviceUrl": "https://api.covid19api.com/summary/",
       "serviceRequestData": {
       "java.util.HashMap":
      
      { "data": "test..." }
      
      }
       }'
      
      }
      
      
      Show
      1. Import this project on BC https://github.com/rafaeltuelho/process-servicecall-exception-handling   2. Build and deploy Test with: curl --location --request POST 'http: //localhost:8080/kie-server/services/ rest /server/containers/kie-process-template/processes/ServiceCall/instances' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic <base64 credentials>' \ --data-raw '{ "serviceUrl" : "https: //api.covid19api.com/summary/" , "serviceRequestData" : { "java.util.HashMap" : { "data" : "test..." } } }' }
    • ---
    • ---

    Description

      I got a StackOverflow error within a specific situation when using the standard RESTWorkItemHandler.

       

      When setting the HandleResponseErrors parameter to true and the service call returns an error (HTTP 4xx or 5xx) the code loops generating a of error. Debugging the code I notice the loop happens in this part of the WIH: https://github.com/kiegroup/jbpm/blob/c5b2dae08a1358326c233def0e26d30eb0fe9b24/jbpm-workitems/jbpm-workitems-core/src/main/java/org/jbpm/process/workitem/core/AbstractLogOrThrowWorkItemHandler.java#L68-L77

      Attachments

        Issue Links

          Activity

            People

              rhn-support-sudnair Sudhish Nair
              rafael.soares Rafael Soares
              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:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: