}
protected static void populateEventWithCurrentContext(ActivitiEventImpl event) {
boolean extractedFromContext = false;
if(Context.isExecutionContextActive()) {
ExecutionContext executionContext = Context.getExecutionContext();
if(executionContext != null) {
extractedFromContext = true;
event.setExecutionId(executionContext.getExecution().getId());
event.setProcessInstanceId(executionContext.getExecution().getProcessInstanceId());
event.setProcessDefinitionId(executionContext.getExecution().getProcessDefinitionId());
}
}
// Fallback to fetching context from the object itself
if(!extractedFromContext){