Data Duplicator (File) (in: File type A, out: File type B)

Duplicate the file of File type data item: A to File type data item: B.

    A. Select FILE DATAData selectFileRequired
    B. Select FILE DATA (update)Data selectFileRequired
    -variable namevariable label
    Aconf_DataIdASelect FILE DATA
    Bconf_DataIdBSelect FILE DATA (update)
    //// == 自動工程コンフィグの参照 / Config Retrieving ==
    var dataIdA = configs.get( "conf_DataIdA" );
    var dataIdB = configs.get( "conf_DataIdB" );
    
    //// == ワークフローデータの参照 / Data Retrieving ==
    var filesOriginal = data.get( dataIdA );
    // java.util.ArrayList
    // of com.questetra.bpms.core.event.scripttask.QfileView
    
    //// == 演算 / Calculating ==
    // if( filesOriginal !== null ){} // for Error Ignore
    var filesCopy = new java.util.ArrayList();
    for(var i=0; i < filesOriginal.size(); i++){
      var tmpName = "copy_" + filesOriginal.get(i).getName();
      filesCopy.add(
        new com.questetra.bpms.core.event.scripttask.NewQfile(
          tmpName,
          filesOriginal.get(i).getContentType(), 
          filesOriginal.get(i)
        )
      );
    }
    
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdB, filesCopy );
    

    • A’: Files stored in the Data Item selected in config A
    • Files of A’ will be stored in the Table type Data Item selected in config B
    • Place it before a Step of selecting files or replacing some files