Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1695

Subprocess start() method should be usable with an arguments array

    XMLWordPrintable

Details

    Description

      Current Situation

      • The documentation states that subprocesses can be started by use of the start() method either with a string argument or an array argument.
        • Using an array argument results in the error message:
          COM-80020009  Ausnahmefehler aufgetreten. [step] [] [Z-JAVA-105  Java exception java.lang.RuntimeException: COM-8002000E  Unzulässige Parameteranzahl. [Invoke] [dispid=00000003] [], method=spooler_process()Z [], in Remote_module_instance_server::step], method=call
          
        • Example
          <job  name="create_subprocess">
              <script  language="java:javascript">
                  <![CDATA[
          function spooler_process()
          {
              // this works
              // var command = "cmd.exe /c dir /b";
          
              // does not work
              var command = ["cmd.exe", "/c", "dir", "/b"];
          
              var subProcess = spooler_task.create_subprocess();
              subProcess.start(command);
          
          	return false;
          }
                  ]]>
              </script>
          
              <run_time />
          </job>
          
        • Consider SourceForge thread from issue links for details

      Desired Behavior

      • For Unix environments both string and array arguments should be usable for the start() method as stated in the docs.
      • For Windows environments exclusively string arguments can be used with the start() method.

      Attachments

        Activity

          People

            jz Joacim Zschimmer
            ap Andreas Püschel
            Andreas Püschel Andreas Püschel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: