if (entity instanceof WorkUnit) {
artifact = (Object[]) ((WorkUnit) entity).get();
if (((WorkUnit) entity).isTimedOut() && artifact instanceof CAS[]) {
for (int i = 0; i < artifact.length && artifact[i] != null; i++) {
ChunkMetadata meta = CPMUtils.getChunkMetadata((CAS) artifact[i]);
if (meta != null) {
EntityProcessStatusImpl enProcSt = new EntityProcessStatusImpl(
processingUnitProcessTrace);
enProcSt.addEventStatus("Process", "Failed", new SkipCasException(
"Dropping CAS due chunk Timeout. Doc Id::" + meta.getDocId() + " Sequence:"
+ meta.getSequence()));
doNotifyListeners(artifact[i], true, enProcSt);
} else {
EntityProcessStatusImpl enProcSt = new EntityProcessStatusImpl(
processingUnitProcessTrace);
enProcSt.addEventStatus("Process", "Failed", new SkipCasException(