@Override public boolean handleError() { currentActivityIndex++; if (currentActivityIndex == jobEvent.getActivities().size()) { return false; } else { List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get( currentActivityIndex)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent.getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); return true; } } }
@Override @SuppressWarnings("unchecked") public boolean handleError() { currentActivityIndex++; if (currentActivityIndex == jobEvent.getActivities().size()) { return false; } else { List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get( currentActivityIndex)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent.getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); return true; } } }
@Override @SuppressWarnings("unchecked") public boolean handleError() { currentActivityIndex++; if (currentActivityIndex == jobEvent.getActivities().size()) { return false; } else { List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get( currentActivityIndex)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent.getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); return true; } } }
private DispatchJobEvent prepareNewJobEvent( Map<String, T2Reference> data, AbstractDispatchEvent dispatchEvent) { DispatchJobEvent dispatchJobEvent = (DispatchJobEvent) dispatchEvent; Map<String, T2Reference> newInputs = new HashMap<String, T2Reference>( dispatchJobEvent.getData()); newInputs.putAll(data); DispatchJobEvent newJobEvent = new DispatchJobEvent(dispatchEvent .getOwningProcess(), dispatchEvent.getIndex(), dispatchEvent.getContext(), newInputs, ((DispatchJobEvent) dispatchEvent).getActivities()); // TODO: Should this be registered as an incomingJobs? If so the // conditional // could even feed to itself, and we should also keep a list of // originalJobs. return newJobEvent; }
private DispatchJobEvent prepareNewJobEvent( Map<String, T2Reference> data, AbstractDispatchEvent dispatchEvent) { DispatchJobEvent dispatchJobEvent = (DispatchJobEvent) dispatchEvent; Map<String, T2Reference> newInputs = new HashMap<String, T2Reference>( dispatchJobEvent.getData()); newInputs.putAll(data); DispatchJobEvent newJobEvent = new DispatchJobEvent(dispatchEvent .getOwningProcess(), dispatchEvent.getIndex(), dispatchEvent.getContext(), newInputs, ((DispatchJobEvent) dispatchEvent).getActivities()); // TODO: Should this be registered as an incomingJobs? If so the // conditional // could even feed to itself, and we should also keep a list of // originalJobs. return newJobEvent; }
/** * Receive a job from the layer above, store it in the state map then relay * it to the layer below with a modified activity list containing only the * activity at index 0 */ @Override public void receiveJob(DispatchJobEvent jobEvent) { addJobToStateList(jobEvent); List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get(0)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent .getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); }
/** * Receive a job from the layer above, store it in the state map then relay * it to the layer below with a modified activity list containing only the * activity at index 0 */ @SuppressWarnings("unchecked") @Override public void receiveJob(DispatchJobEvent jobEvent) { List<JobState> stateList = null; synchronized (stateMap) { stateList = stateMap.get(jobEvent.getOwningProcess()); if (stateList == null) { stateList = new ArrayList<JobState>(); stateMap.put(jobEvent.getOwningProcess(), stateList); } } stateList.add(getStateObject(jobEvent)); List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get(0)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent .getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); }
/** * Receive a job from the layer above, store it in the state map then relay * it to the layer below with a modified activity list containing only the * activity at index 0 */ @SuppressWarnings("unchecked") @Override public void receiveJob(DispatchJobEvent jobEvent) { addJobToStateList(jobEvent); List<Activity<?>> newActivityList = new ArrayList<Activity<?>>(); newActivityList.add(jobEvent.getActivities().get(0)); getBelow().receiveJob( new DispatchJobEvent(jobEvent.getOwningProcess(), jobEvent .getIndex(), jobEvent.getContext(), jobEvent.getData(), newActivityList)); }
for (Activity<?> activity : jobEvent.getActivities()) {
public void receiveJob(final DispatchJobEvent jobEvent) { for (Activity<?> a : jobEvent.getActivities()) {
for (Activity<?> activity : jobEvent.getActivities()) {
iterationProvItem.setProcessId(jobEvent.getOwningProcess()); for (Activity<?> activity : jobEvent.getActivities()) { if (activity instanceof AsynchronousActivity) { ActivityProvenanceItem activityProvItem = new ActivityProvenanceItem(
iterationProvItem.setProcessId(jobEvent.getOwningProcess()); for (Activity<?> activity : jobEvent.getActivities()) { if (activity instanceof AsynchronousActivity) { ActivityProvenanceItem activityProvItem = new ActivityProvenanceItem();