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

For the last job node in a job chain <copy_params from ="order"> does not work if default settings have been modified

    XMLWordPrintable

Details

    Description

      As of Now behavior

      • When a last Job node in a job chain send commands add_order on success ( see below ) the parameters from order are not copied and send to next job chain.
        <commands  on_exit_code="0">
                <add_order  job_chain="JobChain2/JobChain100" replace="yes">
                    <params >
                        <copy_params  from="order"/>
                    </params>
                </add_order>
            </commands>
        

      How to reproduce

      • Unzip attached example file in the live folder
      • Skip job node 2 and END_NODE
      • start the Order id start_process_with_params , order parametrized Playground/TestChain/TestChain,start_process_with_params
        • give values for the three parameters eg. param1=100, param2=200, param3=300
        • and click submit
      • Order Playground/TestChain/TestChain,start_process_with_params will run through the job chain TestChain, job node 1 will send an order to the job chain Playground/Autostart/Autochain
      • Check the order history log of the job chain Playground/Autostart/Autochain, the three parameters will not have any value.

      Workaround by JobScheduler configuration

      • This feature works well if the following default setting is used in ./config/scheduler.xml:
        <params>
            <param name="scheduler.order.keep_order_content_on_reschedule" value="true"/>
        </params>
        
      • The problem occurs with this setting being assigned the value false. Assiging the value true (default) or not using this setting results in the desired behavior.

      Workaround by job chain configuration

      • Insert a dummy node (in the below sample called END_NODE) and assign it a dummy JITL job, e.g. sos/jitl/JobChainEnd
      • Now the job which is generating the order is no more the last node of the job chain.
      • <job_chain orders_recoverable="yes" visible="yes">
        <job_chain_node error_state="Error" job="start" next_state="2" state="1"/>
        <job_chain_node error_state="Error" job="job1" next_state="END_NODE" state="2"/>
        <job_chain_node error_state="Error" job="/sos/jitl/JobChainEnd" next_state="Success" state="END_NODE"/>
        <job_chain_node state="Success"/>
        <job_chain_node state="Error"/>
        </job_chain>
        

      Maintainer Notes

      • The behavior remains unchanged as it works well with the default settings and otherwise will raise some substantial risk when modifying the behavior of orders.

      Attachments

        1. Playground.zip
          4 kB
        2. Playground.zip
          4 kB
        3. scheduler.xml
          1 kB
        4. Test JobChain with parametrized. .png
          Test JobChain with parametrized. .png
          23 kB

        Activity

          People

            jz Joacim Zschimmer
            mp Mahendra Patidar
            Mahendra Patidar Mahendra Patidar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: