private void createDataLinks(SBWorkflow workflow) throws SBException {
  for (  SBOutputPort port : workflow.getOutputs()) {
    List<String> sources=transformSource(port.getSource());
    for (int position=0; position < sources.size(); position++) {
      String destination=port.getId();
      LinkMerge linkMerge=port.getLinkMerge() != null ? LinkMerge.valueOf(port.getLinkMerge()) : LinkMerge.merge_nested;
      SBDataLink dataLink=new SBDataLink(sources.get(position),destination,linkMerge,position + 1);
      workflow.addDataLink(dataLink);
    }
  }
  for (  SBStep step : workflow.getSteps()) {
    List<SBDataLink> dataLinks=new ArrayList<>();
    for (    Map<String,Object> input : step.getInputs()) {
      List<String> sources=transformSource(SBBindingHelper.getSource(input));
      for (int position=0; position < sources.size(); position++) {
        String destination=SBBindingHelper.getId(input);
        LinkMerge linkMerge=SBBindingHelper.getLinkMerge(input) != null ? LinkMerge.valueOf(SBBindingHelper.getLinkMerge(input)) : LinkMerge.merge_nested;
        SBDataLink dataLink=new SBDataLink(sources.get(position),destination,linkMerge,position + 1);
        dataLinks.add(dataLink);
      }
    }
    workflow.addDataLinks(dataLinks);
  }
}

private void createDataLinks ( SBWorkflow workflow ) throws SBException { for ( SBOutputPort port : workflow . getOutputs ( ) ) { List < String > sources = transformSource ( port . getSource ( ) ) ; for ( int position = 0 ; position < sources . size ( ) ; position ++ ) { String destination = port . getId ( ) ; LinkMerge linkMerge = port . getLinkMerge ( ) != null ? LinkMerge . valueOf ( port . getLinkMerge ( ) ) : LinkMerge . merge_nested ; SBDataLink dataLink = new SBDataLink ( sources . get ( position ) , destination , linkMerge , position + 1 ) ; workflow . addDataLink ( dataLink ) ; } } for ( SBStep step : workflow . getSteps ( ) ) { List < SBDataLink > dataLinks = new ArrayList < > ( ) ; for ( Map < String , Object > input : step . getInputs ( ) ) { List < String > sources = transformSource ( SBBindingHelper . getSource ( input ) ) ; for ( int position = 0 ; position < sources . size ( ) ; position ++ ) { String destination = SBBindingHelper . getId ( input ) ; LinkMerge linkMerge = SBBindingHelper . getLinkMerge ( input ) != null ? LinkMerge . valueOf ( SBBindingHelper . getLinkMerge ( input ) ) : LinkMerge . merge_nested ; SBDataLink dataLink = new SBDataLink ( sources . get ( position ) , destination , linkMerge , position + 1 ) ; dataLinks . add ( dataLink ) ; } } workflow . addDataLinks ( dataLinks ) ; } }
created data links from source properties
