YADE - Yet Another Data Exchange Tool
  1. YADE - Yet Another Data Exchange Tool
  2. YADE-518

${scheduler_file_name} should be substituted when used for FILE_PATH


    • Type: Fix Fix
    • Status: Released (View Workflow)
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.12.5
    • Component/s: YADE JITL Jobs
    • Labels:


      Current Situation

      It is possible to set the value of FILE_PATH to ${scheduler_file_path}. That will be substituted with the actual parameter value of SCHEDULER_FILE_PATH. With this it is possible to use a file order source in a job chain. An YADE job that is part of the job chain will then transfer any incoming file.

      When the path is not correct in SCHEDULER_FILE_PATH this does not work. This can happen when using the SMB protocol for the source protocol and the the file order source is assigned to a remote Universal Agent. Then the incoming file has a name like c:/path/name but the transfer must address the file with /c$/path/name.

      Desired Behavior

      When specifying ${scheduler_file_name} as the value for FILE_PATH this should be substituted with the basename of SCHEDULER_FILE_PATH. The value of DIRECTORY should then be added to FILE_PATH. With this the configuration can specify


      With the parameter SCHEDULER_FILE_PATH=c:/path/name this will be set to /c$/path/name


      The correct value can be set in the preprocessor of the YADE job. See this example. The basename will be extracted from the original name. Then the original name is set to directory + basename. Plesae not that the value for the directory must be set in the params for the order or the job.

      The original value is restored in the spooler_process_after method.

      function spooler_process_before(){
          var params = spooler_task.params;
          params.merge( spooler_task.order.params );
          var dir = params.value("directory");
         	var Paths = Java.type( 'java.nio.file.Paths' );
          var incomingFile = Paths.get( spooler_task.order.params.value( 'scheduler_file_path' ) );
      	incomingFileBasename = String( incomingFile.getFileName() );
          spooler_log.info("basename" + incomingFileBasename);
          spooler_task.order.params.set_var('scheduler_file_path',dir + "/" + incomingFileBasename);
      	return true;
      function spooler_process_after(spooler_process_result){
      	return true;


        There are no comments yet on this issue.


          • Assignee:
            Uwe Risse
            Uwe Risse
            Mahendra Patidar
          • Votes:
            0 Vote for this issue
            2 Start watching this issue


            • Created: