public void requestRun(Runnable runMe) { String newThreadName = "Conditional " + getParentProcessIdentifier(); Thread thread = new Thread(runMe, newThreadName); thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { fail("Uncaught exception while invoking " + jobIdentifier, e); } }); thread.start(); } }
fail("Condition service didn't contain output port " + LOOP_PORT); return; fail("Condition service failed: " + loopRef); return; fail("Condition service output " + LOOP_PORT + " depth is not 0, but " + loopRef.getDepth()); fail("Unknown job identifier " + jobIdentifier); DispatchJobEvent newJobEvent = prepareNewJobEvent(data, dispatchEvent); getBelow().receiveJob(newJobEvent); (DispatchJobQueueEvent) dispatchEvent); } else { fail("Unknown type of incoming event " + dispatchEvent); fail("Initial loop condition failed"); (DispatchResultEvent) outgoingEvent); } else { fail("Unknown type of outgoing event " + outgoingEvent);
fail("Conditional activity didn't contain output port " + LOOP_PORT); return; fail("Conditional activity failed: " + loopRef); return; fail("Conditional activity output " + LOOP_PORT + " depth is not 0, but " + loopRef.getDepth()); fail("Unknown job identifier " + jobIdentifier); DispatchJobEvent newJobEvent = prepareNewJobEvent(data, dispatchEvent); getBelow().receiveJob(newJobEvent); (DispatchJobQueueEvent) dispatchEvent); } else { fail("Unknown type of incoming event " + dispatchEvent); fail("Initial loop condition failed"); (DispatchResultEvent) outgoingEvent); } else { fail("Unknown type of outgoing event " + outgoingEvent);
private void checkCondition(AbstractDispatchEvent event) { Activity<?> condition; condition = config.getCondition(); if (condition == null) { super.receiveError(new DispatchErrorEvent(event.getOwningProcess(), event.getIndex(), event.getContext(), "Can't invoke conditional activity: null", null, DispatchErrorType.INVOCATION, condition)); return; } if (!(condition instanceof AbstractAsynchronousActivity)) { DispatchErrorEvent errorEvent = new DispatchErrorEvent( event.getOwningProcess(), event.getIndex(), event.getContext(), "Can't invoke conditional activity " + 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); }
private void checkCondition(AbstractDispatchEvent event) { Activity<?> condition; condition = config.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); }
public void fail(String message, Throwable t) { fail(message, t, DispatchErrorType.INVOCATION); }
public void fail(String message) { fail(message, null, DispatchErrorType.INVOCATION); }
public void fail(String message) { fail(message, null, DispatchErrorType.INVOCATION); }
public void fail(String message, Throwable t) { fail(message, t, DispatchErrorType.INVOCATION); }
public void requestRun(Runnable runMe) { String newThreadName = "Condition service " + getParentProcessIdentifier(); Thread thread = new Thread(runMe, newThreadName); thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() { public void uncaughtException(Thread t, Throwable e) { fail("Uncaught exception while invoking " + jobIdentifier, e); } }); thread.start(); } }
public void uncaughtException(Thread t, Throwable e) { fail("Uncaught exception while invoking " + jobIdentifier, e); } });
public void uncaughtException(Thread t, Throwable e) { fail("Uncaught exception while invoking " + jobIdentifier, e); } });