if (task == null) {
task = finishedEventChains.get(event.getChainId());
}
/* Now check pseudo-tasks. */
if (task == null) {
VcEventType vcEventType = VcEventType.getInstance(event);
ManagedObjectReference moRef = null;
if (event instanceof VmEvent && event.getVm() != null) {
moRef = event.getVm().getVm();
pTask = removePseudoTask(vcEventType, moRef);
} else if (event instanceof ResourcePoolEvent) {