public void notify(DelegateCaseExecution planItem) throws Exception {
CmmnExecution execution = (CmmnExecution) planItem;
String activityId = execution.getEventSource().getId();
CaseExecutionState previousState = execution.getPreviousState();
String previousStateName = "()";
if (!previousState.equals(CaseExecutionState.NEW)) {
previousStateName = previousState.toString();
}
CaseExecutionState newState = execution.getCurrentState();
String stateTransition = previousStateName + " --" + execution.getEventName() + "(" + activityId + ")--> " + newState;
log.fine("collecting state transition: " + stateTransition);