Uploaded image for project: 'JITL - JobScheduler Integrated Template Library'
  1. JITL - JobScheduler Integrated Template Library
  2. JITL-288

Parameter substitution has error if a parameter value contains an unquoted dollar ($)

    XMLWordPrintable

Details

    Description

      Current Situation

      Parameters of JITL jobs can be substituted by the values of other parameters.

      <param name="foo" value="world"/>
      <param name="bar" value="hello \${foo}"/>
      

      If the value of foo in the above example has a $ inside then the following error raises:

      JSJ_F_0060: error occurred reading Parameter from Variable_set : Illegal group reference
      

      Desired Behavior

      Substitution should work without above error

      Typical Use Case

      If you have for example the YADE job in a job chain with a file_order_source to transfer the file then you have to set the YADE parameter file_path with the value of the file_order_source parameter scheduler_file_path

      <param name="file_path" value="\${scheduler_file_path}"/>
      

      Unfortunally, a file order source can have a $ in its parameter scheduler_file_path, e.g. \\otherServer\c$\temp\test.txt so that above error is raised.

      Workaround

      Use a pre-processing to set the YADE parameter file_path

          <monitor  name="set_file_path_with_file_order_source" ordering="0">
              <script  language="javax.script:ecmascript">
                  <![CDATA[
      function spooler_process_before(){
          var orderParams = spooler_task.order().params();
          orderParams.set_value( "file_path", orderParams.value("scheduler_file_path") );
          return true;
      }
                  ]]>
              </script>
          </monitor>
      

      Attachments

        Activity

          People

            ur Uwe Risse
            oh Oliver Haufe
            Oliver Haufe Oliver Haufe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: