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
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:
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)?
Shouldn’t the REST endpoint tell this exception directly such that one can react appropriately?