Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9635

Stackoverflow error on RESTWorkItemHandler

XMLWordPrintable

    • False
    • False
    • NEW
    • NEW
    • 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..." } } }' }
    • ---
    • ---

      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

              rhn-support-sudnair Sudhish Nair
              rhn-support-sudnair Sudhish Nair
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: