uima-ducc-common/src/main/java/org/apache/uima/ducc/common/uima/DuccJobProcessFC.java [63:91]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void initialize(FlowControllerContext aContext) throws ResourceInitializationException {
    super.initialize(aContext);

    FlowConstraints flowConstraints = aContext.getAggregateMetadata().getFlowConstraints();
    mSequence = new ArrayList<String>();
    if (flowConstraints instanceof FixedFlow) {
      String[] sequence = ((FixedFlow) flowConstraints).getFixedFlow();
      mSequence.addAll(Arrays.asList(sequence));
    } else {
      throw new ResourceInitializationException(ResourceInitializationException.FLOW_CONTROLLER_REQUIRES_FLOW_CONSTRAINTS,
              new Object[]{this.getClass().getName(), "fixedFlow", aContext.getAggregateMetadata().getSourceUrlString()});
    }

    // Check if first delegate is a CasMultiplier.
    // Any other CMs will have no special treatment, 
    // i.e. parent will follow children thru the rest of the pipeline
    
    Iterator<Entry<String, AnalysisEngineMetaData>> aeIter = getContext().getAnalysisEngineMetaDataMap().entrySet().iterator();
    while (aeIter.hasNext()) {
      Entry<String, AnalysisEngineMetaData> entry = aeIter.next();
      AnalysisEngineMetaData md = entry.getValue();
      OperationalProperties op = md.getOperationalProperties();
      if (op.getOutputsNewCASes()) {
        if (mSequence.get(0).equals(entry.getKey())) {
          mStartsWithCasMultiplier = true;
        }
      } 
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



uima-ducc-user/src/main/java/org/apache/uima/ducc/FlowController.java [63:91]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void initialize(FlowControllerContext aContext) throws ResourceInitializationException {
    super.initialize(aContext);

    FlowConstraints flowConstraints = aContext.getAggregateMetadata().getFlowConstraints();
    mSequence = new ArrayList<String>();
    if (flowConstraints instanceof FixedFlow) {
      String[] sequence = ((FixedFlow) flowConstraints).getFixedFlow();
      mSequence.addAll(Arrays.asList(sequence));
    } else {
      throw new ResourceInitializationException(ResourceInitializationException.FLOW_CONTROLLER_REQUIRES_FLOW_CONSTRAINTS,
              new Object[]{this.getClass().getName(), "fixedFlow", aContext.getAggregateMetadata().getSourceUrlString()});
    }

    // Check if first delegate is a CasMultiplier.
    // Any other CMs will have no special treatment, 
    // i.e. parent will follow children thru the rest of the pipeline
    
    Iterator<Entry<String, AnalysisEngineMetaData>> aeIter = getContext().getAnalysisEngineMetaDataMap().entrySet().iterator();
    while (aeIter.hasNext()) {
      Entry<String, AnalysisEngineMetaData> entry = aeIter.next();
      AnalysisEngineMetaData md = entry.getValue();
      OperationalProperties op = md.getOperationalProperties();
      if (op.getOutputsNewCASes()) {
        if (mSequence.get(0).equals(entry.getKey())) {
          mStartsWithCasMultiplier = true;
        }
      } 
    }
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



