/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated(); sendErrorOutput(errorEvent); }
/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated();this. sendErrorOutput(errorEvent, errorEvent.getCause(), null); }
/** * Always send the error document job result on receiving a failure, at * least for now! This should be configurable, in effect this is the part * that ensures the processor never sees a top level failure. */ @Override public void receiveError(DispatchErrorEvent errorEvent) { getState(errorEvent.getOwningProcess()).incrementErrorsTranslated(); sendErrorOutput(errorEvent, errorEvent.getCause(), null); }
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { Set<T2Reference> errorReferences = new HashSet<T2Reference>(); for (T2Reference ei : jobEvent.getData().values()) { if (ei.containsErrors()) { errorReferences.add(ei); } } if (errorReferences.isEmpty()) { // relay the message down... getBelow().receiveJob(jobEvent); } else { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent, null, errorReferences); } }
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { Set<T2Reference> errorReferences = new HashSet<T2Reference>(); for (T2Reference ei : jobEvent.getData().values()) { if (ei.containsErrors()) { errorReferences.add(ei); } } if (errorReferences.isEmpty()) { // relay the message down... getBelow().receiveJob(jobEvent); } else { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent, null, errorReferences); } }
/** * If the job contains errors, or collections which contain errors * themselves then bounce a result message with error documents in back up * to the layer above */ @Override public void receiveJob(DispatchJobEvent jobEvent) { for (EntityIdentifier ei : jobEvent.getData().values()) { if (ei instanceof ErrorDocumentIdentifier || (ei instanceof EntityListIdentifier && ((EntityListIdentifier) ei) .getContainsErrors())) { getState(jobEvent.getOwningProcess()) .incrementErrorsReflected(); sendErrorOutput(jobEvent); return; } } // Got here so relay the message down... getBelow().receiveJob(jobEvent); }