if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {
Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(
ActivitiEventBuilder.createEntityEvent(ActivitiEventType.TASK_CREATED, task));
}
task.fireEvent(TaskListener.EVENTNAME_CREATE);
}
public void signal(ActivityExecution execution, String signalName, Object signalData) throws Exception {
if (!((ExecutionEntity)execution).getTasks().isEmpty())
throw new ActivitiException("UserTask should not be signalled before complete");