Merge merge = ((MergeOutputPort) source).getMerge(); queue.add(merge);
private void considerNearestUpstream(TokenProcessingEntity investigate) { if (investigate instanceof Processor) for (Condition condition : ((Processor) investigate) .getPreconditionList()) considerInclusion(condition.getControl()); for (EventHandlingInputPort inputPort : investigate.getInputPorts()) { Datalink incomingLink = inputPort.getIncomingLink(); if (incomingLink == null) continue; EventForwardingOutputPort source = incomingLink.getSource(); if (source instanceof ProcessorOutputPort) considerInclusion(((ProcessorOutputPort) source).getProcessor()); else if (source instanceof MergeOutputPort) considerInclusion(((MergeOutputPort) source).getMerge()); else { // Ignore } } }
int counter = 0; // counter for merge input port names if (incomingLink.getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) incomingLink.getSource()).getMerge(); } else { merge = edits.createMerge(dataflow);
int counter = 0; // counter for merge input port names if (incomingLink.getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) incomingLink.getSource()).getMerge(); } else { merge = edits.createMerge(dataflow);
private void addMergedDatalink(EventForwardingOutputPort sourcePort, EventHandlingInputPort sinkPort, Dataflow targetDataflow) throws EditException, WorkflowTranslationException { Merge merge = null; if (sinkPort.getIncomingLink() == null) { merge = edits.createMerge(targetDataflow); // Add to the dataflow edits.getAddMergeEdit(targetDataflow, merge).doEdit(); } else { if (sinkPort.getIncomingLink().getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) sinkPort.getIncomingLink() .getSource()).getMerge(); } else { // FIXME: what to do when a Taverna 1 workflow has 2 inputs to a // single port that isn't a merge?? For now throw an exception throw new WorkflowTranslationException( "Unable to translate a workflow that has multiple un-merged inputs to a single port."); } } edits.getConnectMergedDatalinkEdit(merge, sourcePort, sinkPort) .doEdit(); }
if (sinkPort.getIncomingLink().getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) sinkPort.getIncomingLink() .getSource()).getMerge(); } else { throw new DeserializationException(
if (sinkPort.getIncomingLink().getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) sinkPort.getIncomingLink() .getSource()).getMerge(); } else { throw new DeserializationException(
private void addMergedDatalink(EventForwardingOutputPort sourcePort, EventHandlingInputPort sinkPort, Dataflow targetFlow) throws EditException, WorkflowTranslationException { Merge merge = null; if (sinkPort.getIncomingLink() == null) { merge = edits.createMerge(sinkPort); // Add to the dataflow edits.getAddMergeEdit(targetFlow, merge).doEdit(); } else { if (sinkPort.getIncomingLink().getSource() instanceof MergeOutputPort) { merge = ((MergeOutputPort) sinkPort.getIncomingLink() .getSource()).getMerge(); } else { // FIXME: what to do when a Taverna 1 workflow has 2 inputs to a // single port that isn't a merge?? For now throw an exception throw new WorkflowTranslationException( "Unable to translate a workflow that has multiple un-merged inputs to a single port."); } } edits.getConnectMergedDatalinkEdit(merge, sourcePort, sinkPort) .doEdit(); }
assertEquals(0,merge.getOutputPort().getOutgoingLinks().size()); assertSame(merge,((MergeOutputPort)merge.getOutputPort()).getMerge());
assertSame(merge, mergeOutput.getMerge());
assertSame(merge, mergeOutput.getMerge());
assertSame(merge, mergeOutput.getMerge());