Unable to propagate BPMN error to external task

Hi,

I’m trying to implement error handling in my REST-based application talking to Camunda v7.8.0.

The error name and code is “InvalidAggregateException” and I try to propagate the error on the endpoint “/external-task/{id}/bpmnError” with the json body

{
“workerId”: “worker”,
“errorCode”: “InvalidAggregateException”
}

Camunda keeps returning with:

{
“type”: “ProcessEngineException”,
“message”: "ENGINE-13033 Propagation of bpmn error InvalidAggregateException failed. "
}

What am I doing wrong here? No clue…

Thanks!
Matt

Hi Matt,

What does the server log say? It should contain the stacktrace of the exception.

Cheers,
Thorben

Hi Thorben,

I checked the log and it boils down to “Unable to evaluate script: groovy.lang.MissingPropertyException: No such property: queryResult for class: Script6”. I use that variable in my output parameters - it contains a json object if the task was completed successfully. But surely as I throw an error, the output parameters should not be computed. So two things:

  1. Do I have to write my output parameter scripts defensively or is there another way to prevent them from being executed (I could use a script task afterwards but that’s kind of ugly)?
  2. Shouldn’t the REST endpoint tell this exception directly such that one can react appropriately?

Thanks for your help,
Matt

@mhelling some context from a similar issue about the output mapping and why it works that way: BpmnError from service task and output variables

2 Likes