return;
}
private void employPluginExceptionHandler(WorkItem workItem, Exception e) {
String location = "employPluginExceptionHandler";
Directive directive = getDirective(workItem,e);
String message = "seqNo:"+workItem.getSeqNo()+" "+"wiId:"+workItem.getCasDocumentText()+" "+"directive:"+directive+" "+"reason:"+directive.getReason();
duccOut.debug(location, workItem.getJobId(), workItem.getProcessId(), message, e);
switch(directive) {
case ProcessContinue_CasNoRetry:
duccOut.info(location, workItem.getJobId(), workItem.getProcessId(), message);
workItemStateManager.error(workItem.getSeqNo());
workItemError(workItem, e, directive);
remove(workItem);
recycleCAS(workItem);
accountingWorkItemIsError(workItem.getProcessId());
try {
queueCASes(1,queue,workItemFactory);
}
catch(Exception exception) {
duccOut.error(location, jobid, "processing error?", exception);
}
break;
case ProcessContinue_CasRetry:
retry(workItem);
break;
case ProcessStop_CasNoRetry:
duccOut.info(location, workItem.getJobId(), workItem.getProcessId(), message);
workItemStateManager.error(workItem.getSeqNo());
workItemError(workItem, e, directive);
remove(workItem);
recycleCAS(workItem);
accountingWorkItemIsError(workItem.getProcessId());
break;
case ProcessStop_CasRetry:
retry(workItem);
break;
case JobStop:
duccOut.info(location, workItem.getJobId(), workItem.getProcessId(), message);
StringBuffer sb = new StringBuffer();
sb.append("job driver received JobStop from plugin error handler");
if(directive.hasReason()) {
sb.append(" with reason: ");
sb.append(directive.getReason());
}
driverStatusReport.killJob(JobCompletionType.CanceledByDriver, new Rationale(sb.toString()));
break;
}
}