Hi,
I am creating my own incident handler, extending the default one. In addition to create the incident in Camunda, I want to send a message to another service. This message must contain the business key.
The business key is not in the IncidentContext object.
How can I retrieve it?
I tried to use runtimeService to query the Camunda engine, but Spring refused to instantiate my IncidentHandler for circular dependencies reasons (I assume the runtimeService depends on IncidentHandler).
I had a look at the DefaultIncidentHandler code. So I could try to retrieve the Execution like this
ExecutionEntity execution = Context
.getCommandContext()
.getExecutionManager()
.findExecutionById(context.getExecutionId());
Because ExecutionEntity is in a “impl” package, I am not sure this is a good way to get it.
Thanks,
Alain