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

An <add_order> command for a job chain node should work for the same job chain

    XMLWordPrintable

    Details

      Description

      Current Situation

      If an add_order command is configured for a job chain node

      job chain "job_chain1" with an add_order
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <job_chain>
          <job_chain_node  state="start" job="job1" next_state="success" error_state="error">
              <on_return_codes >
                  <on_return_code  return_code="0">
                      <add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="job_chain1"/>
                  </on_return_code>
              </on_return_codes>
          </job_chain_node>
          <job_chain_node  state="success"/>
          <job_chain_node  state="error"/>
      </job_chain>
      

      where the job chain in the add_order command uses the same job chain then a configuration error is raised:

      Z-JAVA-105 Java exception XmlException: java.lang.IllegalArgumentException: com.sos.scheduler.engine.plugins.nodeorder.NodeOrderPlugin <add_order job_chain='JobChain /test/job_chain1'> must denote the own job_chain - In <job_chain_node> (:1:121) <on_return_codes> (:2:26) <on_return_codes> (:2:26) <on_return_code> (:3:45) <on_return_code> (:3:45) <{https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin}add_order> (:4:120) <{https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin}add_order> (:4:120) - caused by -..., method=CallVoidMethodA []
      

      Desired Behavior

      An add_order command to the same job chain should be possible.

      Maintainer Note

      • If you use the same job chain in an add_order command then you have to set an order id too. Otherwise, the current order would be replaced.
        Caused by this conflict a configuration error is reported for which the error messsage was wrong and is now updated with this fix.
        Z-JAVA-105 Java exception XmlException: java.lang.IllegalArgumentException: com.sos.scheduler.engine.plugins.nodeorder.NodeOrderPlugin <add_order job_chain='JobChain:/test/job_chain1'> without attribute id= must not denote the own job_chain - In <job_chain_node> (:1:122) <on_return_codes> (:2:26) <on_return_codes> (:2:26) <on_return_code> (:3:45) <on_return_code> (:3:45) <{https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin}add_order> (:4:120) <{https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin}add_orde..., method=CallVoidMethodA []
        
      • If you set an order id too then it works
        <on_return_codes >
              <on_return_code  return_code="0">
                     <add_order  xmlns="https://jobscheduler-plugins.sos-berlin.com/NodeOrderPlugin" job_chain="job_chain1" id="order2"/>
              </on_return_code>
         </on_return_codes>
        

        Attachments

          Activity

            People

            • Assignee:
              oh Oliver Haufe
              Reporter:
              oh Oliver Haufe
              Approver:
              Oliver Haufe
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: