External task completion and end listener exception

Hi
I have a case where an external task is calling externalTaskService.complete but there is an end Listener registered on the service task as a delegate expression that executes a java class. That does in certain cases throw an BpmnError. This does not appear to work as the complete call fails with this exception.

org.camunda.bpm.client.exception.NotResumedException: TASK/CLIENT-01009 Exception while completing the external task: The corresponding process instance could not be resumed

The problem i’m trying to solve with this maybe slightly strange process is that I want to set proccess variables back to the camunda context from a external worker and also calling externalTaskService.handleBpmnError.

I can’t find a way to do this as this only appears to work with the complete method call.

That’s why I came up with the idea about throwing an BpmnError from the end listener…

Is there any other way of setting variable back in the camunda context from an external worker and at the same time throw an BPMN error?

Thanks
/Martin

Hi Martin,

This should be available as an API from 7.10.0-alpha3 onwards, see https://app.camunda.com/jira/browse/CAM-9148. In terms of workarounds, I can’t think of anything wouldn’t involve modifying the BPMN XML, for example by throwing the error in a separate task/event.

Cheers,
Thorben

Ok, that’s good news. We just need to upgrade then. Is available int the 7.9.3-ee then also?
/Thanks

No. New features are not added to patch releases of prior versions to improve stability and to conform with semantic versioning.