use of org.camunda.bpm.engine.impl.core.instance.CoreExecution in project camunda-bpm-platform by camunda.
the class TaskEntity method fireEvent.
public void fireEvent(String taskEventName) {
List<TaskListener> taskEventListeners = getListenersForEvent(taskEventName);
if (taskEventListeners != null) {
for (TaskListener taskListener : taskEventListeners) {
CoreExecution execution = getExecution();
if (execution == null) {
execution = getCaseExecution();
}
if (execution != null) {
setEventName(taskEventName);
}
try {
TaskListenerInvocation listenerInvocation = new TaskListenerInvocation(taskListener, this, execution);
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(listenerInvocation);
} catch (Exception e) {
throw LOG.invokeTaskListenerException(e);
}
}
}
}
Aggregations