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

API job_chain object should provide methods to retrieve orders

    XMLWordPrintable

Details

    Description

      Current Situation

      • The API provides no possibility to retrieve orders from job chains.

      Workaround

      • Use of the XML command <show_job_chain/> to retrieve the orders of a job chain.
      • Use of the XML command <modify_order/> to change order attributes and e.g. to start an order via <modify_order at="now"/>

      Desired Situation

      • Retrieve orders from a job chain:
         
        // use current job chain
        var job_chain = spooler_task.order.job_chain;
        // alternatively use any other job chain
        // var job_chain = spooler.job_chain("/my_chain");
        // retrieve list of orders
        var orders = job_chain.get_orders();
        for ( var i=0; i < orders.length; i++ ) {
          if( orders[i].id != spooler_task.order.id ) {
            orders[i].suspended = true;
          }
        }
        
      • Retrieve specific order from a job chain:
        var job_chain = spooler.job_chain("/my_chain");
        var order = job_chain.get_order("my_order");
        

      Maintainer Notes

      • Modifications to an order that is not handled by the current task are not persistent, i.e. they will be lost in case of a JobScheduler restart. Therefore we will not develop this feature for the JobScheduler API.
      • Instead, this feature will be resumed for use with Web Services.

      Attachments

        Issue Links

          Activity

            People

              jz Joacim Zschimmer
              oh Oliver Haufe
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: