public void createActivityPortsFromProcessor(Activity activity, Processor processor) { for (InputProcessorPort processorPort : processor.getInputPorts()) new InputActivityPort(activity, processorPort.getName()) .setDepth(processorPort.getDepth()); for (OutputProcessorPort processorPort : processor.getOutputPorts()) { OutputActivityPort activityPort = new OutputActivityPort(activity, processorPort.getName()); activityPort.setDepth(processorPort.getDepth()); activityPort.setGranularDepth(processorPort.getGranularDepth()); } }
if (outputActivityPort.getGranularDepth() == null) outputActivityPort.setGranularDepth(outputProcessorPort .getGranularDepth());
@Test public void processorOutputPorts() throws Exception { Processor hello = workflowBundle.getMainWorkflow().getProcessors() .getByName("Hello"); assertEquals(1, hello.getOutputPorts().size()); assertEquals("greeting", hello.getOutputPorts().getByName("greeting") .getName()); assertEquals(0, hello.getOutputPorts().getByName("greeting").getDepth() .intValue()); assertEquals(0, hello.getOutputPorts().getByName("greeting") .getGranularDepth().intValue()); }
port.setPortDepth(makePortDepth(outPort.getDepth())); port.setGranularPortDepth(makeGranularPortDepth(outPort .getGranularDepth()));
OutputProcessorPort pOut1 = p.getOutputPorts().getByName("out1"); assertEquals(null, pOut1.getDepth()); assertEquals(null, pOut1.getGranularDepth()); assertEquals(null, pOut2.getGranularDepth()); assertEquals(1, pOut3.getGranularDepth().intValue());