@Override public DispatchJobEvent popOwningProcess() throws ProcessIdentifierException { return new DispatchJobEvent(popOwner(), index, context, dataMap, activities); }
@Override public DispatchJobEvent pushOwningProcess(String localProcessName) throws ProcessIdentifierException { return new DispatchJobEvent(pushOwner(localProcessName), index, context, dataMap, activities); }
@Override public DispatchJobEvent pushOwningProcess(String localProcessName) throws ProcessIdentifierException { return new DispatchJobEvent(pushOwner(localProcessName), index, context, dataMap, activities); }
@Override public DispatchJobEvent popOwningProcess() throws ProcessIdentifierException { return new DispatchJobEvent(popOwner(), index, context, dataMap, activities); }
@Override public DispatchJobEvent popOwningProcess() throws ProcessIdentifierException { return new DispatchJobEvent(popOwner(), index, context, dataMap, activities); }
@Override public DispatchJobEvent pushOwningProcess(String localProcessName) throws ProcessIdentifierException { return new DispatchJobEvent(pushOwner(localProcessName), index, context, dataMap, activities); }
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; }
@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; } } }
/** * 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)); }
getBelow() .receiveJob( new DispatchJobEvent(e .getOwningProcess(), e .getIndex(), e.getContext(),
getBelow() .receiveJob( new DispatchJobEvent(e .getOwningProcess(), e .getIndex(), e.getContext(),
getBelow() .receiveJob( new DispatchJobEvent(e .getOwningProcess(), e .getIndex(), e.getContext(),