public void pushData(WorkflowDataToken token, String portName) throws TokenOrderException { // TODO: throw TokenOrderException when token stream is violates order // constraints. for (DataflowInputPort port : dataflow.getInputPorts()) { if (portName.equals(port.getName())) { port.receiveEvent(token.pushOwningProcess(localName)); } } pushDataCalled = true; }
public void pushData(WorkflowDataToken token, String portName) throws TokenOrderException { // TODO: throw TokenOrderException when token stream is violates order // constraints. for (DataflowInputPort port : dataflow.getInputPorts()) { if (portName.equals(port.getName())) { port.receiveEvent(token.pushOwningProcess(localName)); } } pushDataCalled = true; }
/** * 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); } }
workflowDataProvenanceItem); port.receiveEvent(token.pushOwningProcess(localName));