@Override public void setParent(Workflow parent) { if (this.parent != null && this.parent != parent) this.parent.getOutputPorts().remove(this); this.parent = parent; if (parent != null) parent.getOutputPorts().add(this); }
public void clearWorkflowData() { for (DataLink dl : workflow.getDataLinks()) dataLinkResolvedDepthMap.remove(dl); for (InputWorkflowPort iwp : workflow.getInputPorts()) { senderDataLinkMap.remove(iwp); portResolvedDepthMap.remove(iwp); } for (Processor p : workflow.getProcessors()) { for (InputProcessorPort ipp : p.getInputPorts()) { portResolvedDepthMap.remove(ipp); receiverDataLinkMap.remove(ipp); } for (OutputProcessorPort opp : p.getOutputPorts()) { portResolvedDepthMap.remove(opp); senderDataLinkMap.remove(opp); } } for (OutputWorkflowPort owp : workflow.getOutputPorts()) { portResolvedDepthMap.remove(owp); receiverDataLinkMap.remove(owp); } } }
@Override public boolean accept(Visitor visitor) { if (visitor.visitEnter(this)) { List<WorkflowBean> children = new ArrayList<>(); children.addAll(getInputPorts()); children.addAll(getOutputPorts()); children.addAll(getProcessors()); children.addAll(getDataLinks()); children.addAll(getControlLinks()); children.add(getCurrentRevision()); for (WorkflowBean bean : children) if (!bean.accept(visitor)) break; } return visitor.visitLeave(this); }
private void checkCompleteness() { Workflow w = validatorState.get().getWorkflow(); if (w.getProcessors().isEmpty() && w.getOutputPorts().isEmpty()) { validatorState.get().getEventListener().incompleteWorkflow(w); // validatorState.get().addIncompleteWorkflow(w); } }
private void checkWorkflowOutputPorts() { for (OutputWorkflowPort owp : validatorState.get().getWorkflow() .getOutputPorts()) { DataLink mainIncomingLink = validatorState.get() .getMainIncomingDataLink(owp); if (mainIncomingLink == null) { validatorState.get().getEventListener() .missingMainIncomingLink(owp); // validatorState.get().addMissingMainIncomingDataLink(owp); } Integer dataLinkResolvedDepth = validatorState.get() .getDataLinkResolvedDepth(mainIncomingLink); if (dataLinkResolvedDepth == null) { validatorState.get().getEventListener().unresolvedOutput(owp); // validatorState.get().addUnresolvedOutput(owp); return; } // int granularDepth = // mainIncomingLink.getSource().getGranularDepth(); Integer portResolvedDepth = dataLinkResolvedDepth + (validatorState.get().isMergedPort(owp) ? 1 : 0); validatorState.get().getEventListener() .depthResolution(owp, portResolvedDepth); validatorState.get().setPortResolvedDepth(owp, portResolvedDepth); // dopi.setDepths(resolvedDepth, granularDepth); } }
@Test public void resolveWorkflowOutput() throws Exception { OutputWorkflowPort results = wfBundle.getMainWorkflow() .getOutputPorts().getByName("results"); assertSame(results, uriTools.resolveUri( HELLOWORLD_URI.resolve("out/results"), wfBundle)); }
@Test public void uriForWorkflowOutPort() throws Exception { URI uri = uriTools.uriForBean(wfBundle.getMainWorkflow() .getOutputPorts().getByName("results")); assertEquals(HELLOWORLD_URI + "out/results", uri.toASCIIString()); }
receiverPort = proc.getInputPorts().getByName(procPort[1]); } else receiverPort = workflow.getOutputPorts().getByName( secondLink);
@Test public void workflowOutputPorts() throws Exception { NamedSet<OutputWorkflowPort> outputPorts = workflowBundle .getMainWorkflow().getOutputPorts(); assertEquals(1, outputPorts.size()); assertEquals("results", outputPorts.getByName("results").getName()); }
throw new ReaderException( "Link type was processor, but no processor name found"); OutputWorkflowPort candidate = wf.getOutputPorts().getByName( portName); if (candidate == null)
.getOutputPorts().contains(wf1_out1));