dispatchStateChangeEvent(taskEntity, state);
}
protected static void dispatchStateChangeEvent(Object entity, SuspensionState state) {
if(Context.getCommandContext() != null && Context.getCommandContext().getEventDispatcher().isEnabled()) {
ActivitiEventType eventType = null;
if(state == SuspensionState.ACTIVE) {
eventType = ActivitiEventType.ENTITY_ACTIVATED;
} else {
eventType = ActivitiEventType.ENTITY_SUSPENDED;
}