...
Note that this Job is only used to create the current example and is not required for the Join Orders Job itself.
Note also that the Job Chain path (set in line 14 of the script) must be modified to suit the actual path used.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<?xml version="1.0" encoding="ISO-8859-1"?> <job order="yes" stop_on_error="no"> <script language="java:javascript"> <![CDATA[ function spooler_process(){ // merge parameters from task and order var params = spooler_task.params; params.merge( spooler_task.order.params ); // set variable var generate_orders = params.value( 'generate_orders' ); var jobChain = spooler.job_chain('/test/join/y_join/y_join'); // log parameter spooler_log.info( 'generate_orders = ' + generate_orders); // generate orders for (i=0;i<generate_orders;i++){ var order = spooler.create_order(); order.id = spooler_task.order.id + "_" + i; order.params.merge(spooler_task.order.params); order.end_state="join"; if((i%2)==1) { order.state="150"; } else { order.state="160"; } jobChain.add_order(order); } return true; } ]]> </script> <run_time /> </job> |
...