@Override public DispatchErrorEvent pushOwningProcess(String localProcessName) throws ProcessIdentifierException { return new DispatchErrorEvent(pushOwner(localProcessName), index, context, message, cause, failureType, failedActivity); }
@Override public DispatchErrorEvent popOwningProcess() throws ProcessIdentifierException { return new DispatchErrorEvent(popOwner(), index, context, message, cause, failureType, failedActivity); }
@Override public void fail(String message, Throwable t, DispatchErrorType errorType) { logger.warn("Failed (" + errorType + ") invoking condition service " + jobIdentifier + ":" + message, t); AbstractDispatchEvent originalEvent; synchronized (incomingJobs) { originalEvent = incomingJobs.get(jobIdentifier); } receiveError(new DispatchErrorEvent(originalEvent .getOwningProcess(), originalEvent.getIndex(), originalEvent.getContext(), "Can't invoke condition service ", t, DispatchErrorType.INVOCATION, null)); }
@Override public void fail(String message, Throwable t, DispatchErrorType errorType) { logger.warn("Failed (" + errorType + ") invoking " + activity + " for job " + jobEvent + ": " + message, t); monMan.deregisterNode( invocationProcessIdentifier); getAbove().receiveError( new DispatchErrorEvent(jobEvent.getOwningProcess(), jobEvent.getIndex(), jobEvent.getContext(), message, t, errorType, activity)); }
private void checkCondition(AbstractDispatchEvent event) { Activity<?> condition = getCondition(); if (condition == null) { super.receiveError(new DispatchErrorEvent(event.getOwningProcess(), event.getIndex(), event.getContext(), "Can't invoke condition service: null", null, DispatchErrorType.INVOCATION, condition)); return; } if (!(condition instanceof AbstractAsynchronousActivity)) { DispatchErrorEvent errorEvent = new DispatchErrorEvent( event.getOwningProcess(), event.getIndex(), event.getContext(), "Can't invoke condition service " + condition + " is not an instance of AbstractAsynchronousActivity", null, DispatchErrorType.INVOCATION, condition); super.receiveError(errorEvent); return; } AbstractAsynchronousActivity asyncCondition = (AbstractAsynchronousActivity) condition; String jobIdentifier = jobIdentifier(event); Map<String, T2Reference> inputs = prepareInputs(asyncCondition, jobIdentifier); AsynchronousActivityCallback callback = new ConditionCallBack( jobIdentifier); asyncCondition.executeAsynch(inputs, callback); }