Error message of BPMN error from external task

Hi Niall,

Thanks,

I am able to get the error code value from process, but error message map values i am not able get task service which connected from error boundary event.

Code:
ExternalTaskClient client = ExternalTaskClient.create().baseUrl(getEngineUrl()).asyncResponseTimeout(getAsyncResponseTimeout()).disableBackoffStrategy().workerId(getWorkerId()).build();
// Subscribe to the topic
client.subscribe(extTaskprop.getTopic()).lockDuration(extTaskprop.getLockDuration())
.handler((externalTask, externalTaskService) → {
try{
externalTask.complete();
}catch(Exception exception)
{
Map<String, Object> errorVariableMap = new HashMap<>();
errorVariableMap.put(“exceptionCode”, “1000”);
errorVariableMap.put(“exceptionMessage”, “Mandatory data not provided”);
externalTaskService.handleBpmnError(externalTask, “5000”, “Mandatory data not provided”, errorVariableMap);
}
}).open();

Now my question,

Currently the “5000” value i get from process instance variable. Similarly,

How to get “Mandatory data not provided” value from process as part of errorMessage input handleBpmnError method?
How to get errorVariableMap value from process?

Form the below diagram, i need get the errorMessage and errorVariableMap on External Task Two.