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

The property spooler_task.exit_code in a shell job has no effect on the next state of the order

    XMLWordPrintable

Details

    • Fix
    • Status: Dismissed (View Workflow)
    • Minor
    • Resolution: Bogus
    • None
    • None
    • Documentation
    • None

    Description

      Current Situation

      • We assume a shell job triggered by an order terminates with exit code != 0.
      • We modify the exit code to 0 via the API in the postprocessing method spooler_task_after().
      • Then the order nevertheless proceeds to the error node of the job chain:
        Example
         
        <job order="yes" stop_on_error="no">
          <script language="shell"><![CDATA[
        exit 5
                ]]></script>
          <monitor name="process0" ordering="0">
            <script language="javascript"><![CDATA[
        function spooler_task_after() {
            spooler_task.exit_code = 0;
        }
                    ]]></script>
          </monitor>
        </job>
        

      Resolution

      • The method spooler_task.exit_code() sets the exit code for the respective order. However, this method does not affect the result of the order.
      • To affect the behavior of an order proceeding with the next_state or error_state in a job chain implement the spooler_process_after() method like this:
        function spooler_process_after( resultOK ) {
            // resultOK == true
            return false;
        }
        

      Attachments

        Issue Links

          Activity

            People

              ss Stefan Schädlich (Inactive)
              oh Oliver Haufe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: