@Override public String getViewTitle() { return "Workflow output port: " + dataflowOutputPort.getName(); }
/** * Always copy the value of the enclosing dataflow output port */ @Override public int getDepth() { return DataflowOutputPortImpl.this.getDepth(); } };
public DataflowOutputPort createDataflowOutputPort(String name, Dataflow dataflow) { return new DataflowOutputPortImpl(name, dataflow); }
Datalink dl = dopi.getInternalInputPort().getIncomingLink(); dopi.setDepths(-1, -1); if (dl == null) { dopi.setDepths(resolvedDepth, granularDepth);
/** * Adds an output port to the DataFlow. * * @param outputPort * the DataflowOutputPortImpl to be added to the Dataflow * @throws EditException */ protected synchronized void addOutputPort(DataflowOutputPortImpl outputPort) throws EditException { for (DataflowOutputPort existingOutputPort : outputs .toArray(new DataflowOutputPort[] {})) { if (existingOutputPort.getName().equals(outputPort.getName())) throw new NamingException("There already is a dataflow output port named:" + outputPort.getName()); } if (outputPort.getDataflow() != this) { throw new EditException("Port specifies a different dataflow"); } outputs.add(outputPort); }
/** * 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()); } }
@Override protected void undoEditAction(DataflowOutputPortImpl dataflowOutputPort) { dataflowOutputPort.setName(oldName); }
Datalink dl = dopi.getInternalInputPort().getIncomingLink(); dopi.setDepths(-1, -1); if (dl == null) { dopi.setDepths(resolvedDepth, granularDepth);
/** * Adds an output port to the DataFlow. * * @param outputPort * the DataflowOutputPortImpl to be added to the Dataflow * @throws EditException */ protected synchronized void addOutputPort(DataflowOutputPortImpl outputPort) throws EditException { for (DataflowOutputPort existingOutputPort : outputs .toArray(new DataflowOutputPort[] {})) { if (existingOutputPort.getName().equals(outputPort.getName())) throw new NamingException("There already is a workflow output port named:" + outputPort.getName()); } if (outputPort.getDataflow() != this) { throw new EditException("Port specifies a different workflow"); } outputs.add(outputPort); }
/** * 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()); } }
@Override protected void undoEditAction(DataflowOutputPortImpl dataflowOutputPort) { dataflowOutputPort.setName(oldName); }
@Override public void refreshView() { dataflowOutputPortView = new JPanel(); dataflowOutputPortView.setBorder(new EmptyBorder(5,5,5,5)); JLabel outputPortName = new JLabel("Dataflow output port name: " + dataflowOutputPort.getName()); dataflowOutputPortView.add(outputPortName); } }
Datalink dl = dopi.getInternalInputPort().getIncomingLink(); dopi.setDepths(-1, -1); if (dl == null) { dopi.setDepths(resolvedDepth, granularDepth);
/** * Always copy the value of the enclosing dataflow output port */ @Override public int getDepth() { return DataflowOutputPortImpl.this.getDepth(); } }
public DataflowOutputPort createDataflowOutputPort(String name, Dataflow dataflow) { return new DataflowOutputPortImpl(name, dataflow); }
/** * 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()); } }
if (dopi.getName().equals(split[0])) { sink = dopi.internalInput; break;
/** * Always copy the value of the enclosing dataflow output port */ @Override public int getDepth() { return DataflowOutputPortImpl.this.getDepth(); } };