@Override public void receiveEvent(WorkflowDataToken t) { tokenOwningProcess=t.getOwningProcess(); } }
public void resultTokenProduced(WorkflowDataToken token, String portName) { if (instanceOwningProcessId.equals(token.getOwningProcess())) { synchronized (this) { if (token.getIndex().length == 0) { portsToComplete--; } if (portsToComplete == 0) { // Received complete events on all ports, can // un-register this node from the monitor MonitorManager.getInstance().deregisterNode( instanceOwningProcessId.split(":")); } } for (ResultListener resultListener : resultListeners .toArray(new ResultListener[resultListeners.size()])) { resultListener.resultTokenProduced(token .popOwningProcess(), portName); } } }
/** * Forward the event through the output port Also informs any * ResultListeners on the output port to the new token. */ public void receiveEvent(WorkflowDataToken token) { // Pull the dataflow process identifier from the owning process // and push the modified token out // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (token.getIndex().length == 0 && dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).sentFinalToken(portName, token .getOwningProcess()); } WorkflowDataToken newToken = token.popOwningProcess(); sendEvent(newToken); for (ResultListener listener : resultListeners .toArray(new ResultListener[] {})) { listener.resultTokenProduced(newToken, this.getName()); } }
/** * Forward the event through the output port Also informs any * ResultListeners on the output port to the new token. */ public void receiveEvent(WorkflowDataToken token) { // Pull the dataflow process identifier from the owning process // and push the modified token out // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (token.getIndex().length == 0 && dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).sentFinalToken(portName, token .getOwningProcess()); } WorkflowDataToken newToken = token.popOwningProcess(); sendEvent(newToken); for (ResultListener listener : resultListeners .toArray(new ResultListener[] {})) { listener.resultTokenProduced(newToken, this.getName()); } }
/** * Forward the event through the output port Also informs any * ResultListeners on the output port to the new token. */ public void receiveEvent(WorkflowDataToken token) { // Pull the dataflow process identifier from the owning process // and push the modified token out // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (token.getIndex().length == 0 && dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).sentFinalToken(portName, token .getOwningProcess()); } WorkflowDataToken newToken = token.popOwningProcess(); sendEvent(newToken); List<ResultListener> listeners; synchronized (resultListeners) { // thread safe copy before we push tokens (avoiding deadlock with WorkflowInstanceFacade) listeners = new ArrayList<ResultListener>(resultListeners); } for (ResultListener listener : listeners) { listener.resultTokenProduced(newToken, this.getName()); } }
protected void receiveEvent(WorkflowDataToken token, String portName) { List<T2Reference> outputList; String owningProcess = token.getOwningProcess(); synchronized (partialOutputsByProcess) { outputList = partialOutputsByProcess.get(owningProcess);
protected void receiveEvent(WorkflowDataToken token, String portName) { List<T2Reference> outputList; String owningProcess = token.getOwningProcess(); synchronized (partialOutputsByProcess) { outputList = partialOutputsByProcess.get(owningProcess);
elementIndex[index.length] = c; resultTokenProduced(new WorkflowDataToken(dataToken .getOwningProcess(), elementIndex, id, dataToken.getContext()), portName); c++; .getOwningProcess(), dataToken.getContext());
protected void receiveEvent(WorkflowDataToken token, String portName) { int portIndex = inputPortNameToIndex(portName); if (portIndex == -1) { throw new WorkflowStructureException( "Received event on a port that doesn't exist, huh?"); } int[] currentIndex = token.getIndex(); int[] newIndex = new int[currentIndex.length + 1]; newIndex[0] = portIndex; for (int i = 0; i < currentIndex.length; i++) { newIndex[i + 1] = currentIndex[i]; } output.sendEvent(new WorkflowDataToken(token.getOwningProcess(), newIndex, token.getData(), token.getContext())); }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }
/** * Receive an input event, relay it through the internal output port to all * connected entities */ public void receiveEvent(WorkflowDataToken t) { WorkflowDataToken transformedToken = t.pushOwningProcess(dataflow.getLocalName()); // I'd rather avoid casting to the implementation but in this // case we're in the same package - the only reason to do this // is to allow dummy implementations of parts of this // infrastructure during testing, in 'real' use this should // always be a dataflowimpl if (dataflow instanceof DataflowImpl) { ((DataflowImpl) dataflow).tokenReceived(transformedToken .getOwningProcess(), t.getContext()); } for (Datalink dl : internalOutput.getOutgoingLinks()) { dl.getSink().receiveEvent(transformedToken); } }
public void resultTokenProduced(WorkflowDataToken token, String portName) { if (!instanceOwningProcessId.equals(token.getOwningProcess())) { return;
elementIndex[index.length] = c; resultTokenProducedGui(new WorkflowDataToken(dataToken .getOwningProcess(), elementIndex, id, dataToken.getContext()), portName); c++; .getOwningProcess(), dataToken.getContext());
public void resultTokenProduced(WorkflowDataToken token, String portName) { if (!instanceOwningProcessId.equals(token.getOwningProcess())) { return;
public void receiveToken(WorkflowDataToken token) { String newOwner = transformOwningProcess(token.getOwningProcess()); if (filterDepth == -1) { throw new WorkflowStructureException(
public void receiveToken(WorkflowDataToken token) { String newOwner = transformOwningProcess(token.getOwningProcess()); if (filterDepth == -1) { throw new WorkflowStructureException(
public void receiveToken(WorkflowDataToken token) { String newOwner = transformOwningProcess(token.getOwningProcess()); if (filterDepth == -1) { throw new WorkflowStructureException(