if (event.activityKey() == null) {
super.handleAuditEvent (event);
return;
}
// One of our activities has closed (events are pre-filtered)
State ps = typedState();
if (ps.isSameOrSubState(RunningState.TERMINATING)
|| ps.isSameOrSubState(SuspendedState.ABORTING)) {
return;
}
State closedState = null;
try {
closedState = State.fromString
(((WfStateAuditEvent)event).newState());
} catch (InvalidStateException e) {
// actually, this is impossible
logger.error (e.getMessage ());
return;
}
if (closedState.isSameOrSubState (ClosedState.ABORTED)) {
if (ps.isSameOrSubState(OpenState.RUNNING)) {
updateInterim (SuspendedState.SUSPENDED);
} else if ((! ps.isSameOrSubState (NotRunningState.SUSPENDED))) {
return;
}