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

Wrong return code handling when using the api to set the return code in a previous step

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • 1.12
    • 1.12.11, 1.13.1
    • None
    • None

    Description

      Current Situation
      If a post processing monitor is used with a job in a job chain where the exit code is handled in this way

      function spooler_task_after() {
          var rc = spooler_task.exit_code;
      
      	if (rc < 9 ) {
      		spooler_task.exit_code = 0;
      		var next_state = spooler_task.order.job_chain_node.next_state;
      		spooler_task.order.state = next_state;
      	}
      }
      

      and the job terminates with an return code < 9 the return code handling of the next step is wrong.
      The return code of 0 for the next step and the return code handling with

       <on_return_codes >
                
      
          <job_chain_node  state="2" job="secondjob" next_state="success" error_state="error">
              <on_return_codes >
                  <on_return_code  return_code="1..999">
                      <add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="/JS-1856/External/external_jobchain" id="second_step"/>
                  </on_return_code>
              </on_return_codes>
      

      will create an order for the job chain external_jobchain

      Desired Behavior 
      The return code handling should not be effected by an api call in a previous step.

      How to Reproduce 

      • Unzip the attached job chain configuration into your live folder
      • Add an order to the jobchain /JS-1856/First_conf/jobchain1

      Attachments

        Activity

          People

            jz Joacim Zschimmer
            oh Oliver Haufe
            Anuj Mandloi Anuj Mandloi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: