Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Minor changes to text

...

This is done in the Nodes tab of the JobScheduler Object Editor JOE for JobChain0 as shown in Screenshot 1 below.
(A more detailed description of how to use JOE to configure a job chain can be found in JobScheduler Tutorial 2 - Editing a Simple Job with JOE.)

  • The standard progression through the job chains is configured in the NextState and ErrorState fields of the form.
  • Generation of the order to start JobChain1 is configured as shown in the screenshot:
    • 1)  Select Job3 since we want to start JobChain1 if this job ends successfully
    • 2) Click on the Return Codes button to open the Return Code configuration form

...

Limitations of use

Overlapping return codes

Avoid creating overlapping return codes and/or overlapping return code ranges.

  • Overlapping return codes should not be used to create multiple orders.
    • This is automatically corrected in JOE but is possible when configuration is carried out with a code editor.

    • Example:
    • Code Block
      languagexml
      titleExample showing 'overlapping' of return-codes
      collapsetrue
      <!-- do not use overlapping return codes -->
      <on_return_code  return_code="3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainC"/>
      </on_return_code>
      
      <on_return_code  return_code="3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainD"/>
      </on_return_code>
      
      <!-- use mutliple add_order elements for the same return code -->
      <on_return_code  return_code="3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainC"/>
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainD"/>
      </on_return_code>

 

  • Overlapping return code ranges should not be be used.

    • This is currently possible in JOE (versions 1.9.7, 1.10.1).Example:

      Code Block
      languagexml
      titleExample showing 'overlapping' of return-code ranges
      collapsetrue
      <!-- do not use overlapping return code ranges -->
      <on_return_code  return_code="3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainC"/>
      	<to_state  state="6"/>
      </on_return_code>
      
      <on_return_code  return_code="1..3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainD"/>
      </on_return_code>
      
      <!-- use a number of return code configurations -->
      <on_return_code  return_code="3">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainC"/>
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainD"/>
      	<to_state  state="6"/>
      </on_return_code>
      
      <on_return_code  return_code="1..2">
      	<add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="JobChainD"/>
      </on_return_code>

<on_return_code> matching limitations

...

JobScheduler executes on_return_code elements one after the other and executes any element containing a to_state attribute first. This means that of a job ends with a return code that is matched by a number of on_return_code elements, only the element with a to_state attribute will be executed as once this has been done, the order will no longer be at the original state to execute any further on_return_code elements.

...

References

Change Management References

...