Date: Thu, 28 Mar 2024 14:21:33 +0000 (UTC) Message-ID: <2053704606.11529.1711635693536@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_11528_1301909458.1711635693536" ------=_Part_11528_1301909458.1711635693536 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
How to communicate with JobScheduler from PHP scripts e.g. to add jobs.<= /p>
This example describes how you can start jobs, add orders to job chains = by your application. The examples are written in PHP.
FEATURE AVAILABILITY STARTING FROM RELEASE 1.3 FEATURE = AVAILABILITY ENDING WITH RELEASE 1.10
JS-1316 - Getting issue details... STATUS
This document describes how applications can communicate with the JobSch= eduler. Possible tasks could be as follows:
The communication is explained by the means of PHP examples. However you= can use any other programming language of your choice.
The communication with JobScheduler takes place via TCP, where XML comma= nds are transmitted. You can check the documentation for the possible XML c= ommands: http://www.sos-berlin.com/doc/e= n/scheduler.doc/index.xml
Note:
All changes, which are made using the xml-commands vie TCP-commu= nication are not persistent. This means, for example, added jobs are no lon= ger available after restarting the JobScheduler.
Adding of a job with the name myJob. The Job runs once a day at=
6pm and lists the table c:\temp
.
= <add_jobs> <job name=3D"myJob" title =3D "my first job"> <script language=3D"shell"> <![CDATA[ dir c:\temp ]]> </script> <run_time> <period single_start=3D"18:00"/> </run_time> </job> </add_jobs>
telnet localhost 4454
The following XML string can be send e.g. via Telnet
(The JobScheduler receives commands)
= <add_jobs> <job name=3D"myJob" title =3D "my first job"> <script language=3D"shell"> <![CDATA[dir c:\temp ]]> </script> <run_time> <period single_start=3D"18:00"/> </run_time> </job> </add_jobs>
(The JobScheduler answers)
= <?xml version=3D"1.0" encoding=3D"ISO-8859-1"?> <spooler> <answer time=3D"2008-04-08 15:50:33.536"> <ok/> </answer> </spooler>
Example with PHP Socket Communication (@fsockopen)
= //open Socket $socket =3D fsockopen("localhost", "4454", $errno,$errstr, 60); //build command $cmd =3D '<add_jobs><job name=3D"myJob" title =3D "my first = job"> <script'; $cmd +=3D 'language=3D"shell"> <![CDATA[dir c:\temp ]]> &= lt;/script> '; =20 $cmd +=3D '<run_time> <period '; =20 $cdm +=3D 'single_start=3D"18:00"/></run_time></job>&l= t;/add_jobs>'; //send command fputs( $socket, $cmd ); //Close Socket fclose( $socket);
After the JobScheduler has answered, you can view the Job in the JobSche= duler's web interface, JOC.
Evaluate Answer
The following function delivers the JobScheduler's answers in a single s= tring. The JobScheduler delivers the answer via the same socket as was prev= iously used during fputs, e.g. the answer can also be delivered directly af= ter fputs.
= function get_answer($socket) { $answer =3D ''; $s =3D ''; while ( !ereg("</spooler>", $s) && !ereg("<ok[/]?&g= t;", $s) ) { $s =3D fgets($socket, 1000); if (strlen($s) =3D=3D 0) { break; } $answer .=3D $s; $s =3D substr($answer, strlen($answer)-20); // chr(0) am Ende entfernen. if (substr($answer, -1) =3D=3D chr(0)) { $answer =3D substr($answer, 0, -1); break; } } $answer =3D trim($answer); return $answer; }
For an application that sends commands to the JobScheduler it is very us= efull to have a proper error handling. Apart from that, a higher level of a= bstraction is useful for understanding the source code. For this reason SOS= GmbH offers a class for processing the communication. The class encapsulat= es the socket calls and provides a method for reading XML answers of the Jo= bScheduler.
require_once( 'scheduler/sos_scheduler_command.inc.php');
The example can be realized with these classes as follows:
//open so= cket $command =3D new SOS_Scheduler_Command(=E2=80=98localhost=E2=80=99,4454, 60= ); //build command $cmd =3D '<add_jobs><job name=3D"myJob" title =3D "my first job"&g= t; <script'; $cmd +=3D 'language=3D"shell"> <![CDATA[dir c:\temp ]]> </sc= ript> '; $cmd +=3D '<run_time> <period '; $cdm +=3D 'single_start=3D"18:00"/></run_time></job></add= _jobs>'; if (!$command->connect()) { =09echo$get_error(). __FILE__ . __LINE__ ; =09return 0; } //send command $this->command->command($cmd); if ($command->get_answer_error()) { =09echo$command->get_error() . =E2=80=98 =E2=80=98 . __FILE__ . =E2=80= =98 =E2=80=98 . __LINE__ ; } //close socket $command->disconnect();
The advantage of using these classes is the easy handling when assemblin= g the XML data stream.
Within your application you have to setup the Include directory.
ini_set( = 'include_path', 'packages' );
The example with these classes is realized as follows:
if(!defin= ed('APP_SCHEDULER_HOST')) { define ( 'APP_SCHEDULER_HOST', 'localhost' ); } if(!defined('APP_SCHEDULER_PORT')) {define( 'APP_SCHEDULER_PORT', '4454' );= } //load missing classes and returns an object of the class function &get_instance($class, $include_path=3D'scheduler/', $extension= =3D'.inc.php') { =09if ( !class_exists($class) ) { =09=09include( $include_path . strtolower($class) . $extension ); =09} =09$object =3D new $class; =09$object->host=3DAPP_SCHEDULER_HOST; =09$object->port=3DAPP_SCHEDULER_PORT; =09return $object; =20 } $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); //Setting some properties $job->name =3D "myJob"; $job->title =3D "my first job "; //Set the implementation $job->script('shell')->script_source=3D'dir c:\temp'; //The job has a runtime=20 $job->run_time()->period()->single_start =3D "18:00"; $job_command =3D &get_instance('SOS_Scheduler_JobCommand_Launcher','sch= eduler/'); if (! $job_command->add_jobs($job)) { =09echo'error occurred adding job: ' . $job_command->get_error();=20 =09exit;=20 }
The following code should precede the code presented in the examples bel= ow:
if(!defin= ed('APP_SCHEDULER_HOST')) { define ( 'APP_SCHEDULER_HOST', 'localhost' ); } if(!defined('APP_SCHEDULER_PORT')) {define( 'APP_SCHEDULER_PORT', '4454' );= } //load missing classes and returns an object of the class function &get_instance($class, $include_path=3D'scheduler/', $extension= =3D'.inc.php') { =09if ( !class_exists($class) ) { =09=09include( $include_path . strtolower($class) . $extension ); =09} =09$object =3D new $class; =09$object->host=3DAPP_SCHEDULER_HOST; =09$object->port=3DAPP_SCHEDULER_PORT; =09return $object; =20 }
The use of the php-xml interface is explained. You can find a detailed d= ocumentation of the classes in the formats PHP and DOC under: http://www=E2= =80=A6.
At the end of each example you can see the XML code that will be send to= JobScheduler.
//------------------------------------------------------------------= ------- =20 // How to add an order to an existing jobchain //-------------------------------------------------------------------------= =20 $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher','scheduler/'= ); //Create an add_order object (SOS_Scheduler_Command_Add_Order). $order =3D $order_launcher->add_order('jobchain',1); //Setting some properties of the order object $order->id=3D'sostest_12'; $order->replace=3D"yes"; $order->priority=3D"10";=20 $order->title=3D"Testorder";=20 $order->web_service=3D"";=20 $order->at=3D"now+60"; $order->addParam('test','any value'); // Sending XML to the JobScheduler if (!$order_launcher->execute($order)) { =09echo'error occurred adding order: ' . $order_launcher->get_error(); =09exit; }
= <add_order at=3D"now+60" id=3D"sostest_12" job_chain=3D"jobchain" priority=3D"10" replace=3D"yes" state=3D"1" title=3D"Testorder"> <params> <param name=3D"test" value=3D"any value"/> </params> </add_order>
//------------------------------------------------------------------= ------- =20 // How to add an order to an existing jobchain //-------------------------------------------------------------------------= =20 $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher','scheduler/'= ); //Create an add_order object (SOS_Scheduler_Command_Add_Order). $order =3D $order_launcher->add_order('jobchain',1); //Setting some properties of the order object $order->id=3D'sostest_12'; $order->replace=3D"yes"; $order->priority=3D"10";=20 $order->title=3D"Testorder";=20 $order->web_service=3D"";=20 $order->at=3D"now+60"; $order->addParam('test','any value'); // Sending XML to the JobScheduler if (!$order_launcher->execute($order)) { =09echo'error occurred adding order: ' . $order_launcher->get_error(); =09exit; }
&= lt;remove_order order=3D"sostest_13" job_chain=3D"jobchain"/>
//------------------------------------------------------------------= ------ //How to change an existing order //------------------------------------------------------------------------ = =20 //starting with adding an order. $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher','scheduler/'= ); $order =3D $order_launcher->add_order('jobchain',3); $order->replace=3D'yes'; $order->id=3D'sostest_14'; $order->run_time()->single_start=3D"22:00"; if (!$order_launcher->execute($order)) { =09echo'error occurred adding order: ' . $order_launcher->get_error(); e= xit; } //Now change the order.state $order =3D $order_launcher->modify_order('jobchain','sostest_14'); $order->state=3D2; if (!$order_launcher->execute($order)) { =09echo'error occurred modifying order: ' . $order_launcher->get_error()= ; =09exit; }
&l= t;modify_order order=3D"sostest_14" job_chain=3D"jobchain" state=3D"2">= </modify_order>
//------------------------------------------------------------------= ----- // How to start an order with submit.=20 // This can be useful, when you know orders jobchain, id, state and startti= me. //------------------------------------------------------------------------ $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher','scheduler/'= ); if (! $order_launcher->submit('jobchain','sostest_15',2,'now+30')) { =09echo'error occurred submitting order: ' . $order_launcher->get_error(= ); =09exit; }
= <add_order at=3D"now+30" id=3D"sostest_15" job_chain=3D"jobchain" replace=3D"yes" state=3D"2"> </add_order>
//------------------------------------------------------------------= ------ // How to add a job //------------------------------------------------------------------------ $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); //Setting some properties $job->force_idle_timeout =3D "yes"; $job->idle_timeout =3D "1000"; $job->ignore_signals =3D "all"; $job->java_options =3D "java"; $job->min_tasks =3D "2"; $job->name =3D "test_jobname3";=20 $job->order =3D "no"; $job->priority =3D "1" ; $job->stop_on_error =3D "no"; $job->tasks =3D "4"; $job->temporary =3D "no";=20 $job->timeout =3D "10"; $job->title =3D "my job"; $job->visible =3D "yes";=20 //Defining some parameters $job->addParam('var1','value1'); $job->addParam('var2','value2'); //Set the implementation $job->script('javascript')->script_source=3D'a=3D1;'; //The job has a runtime $job->run_time()->period()->single_start =3D "10:00"; $job->run_time()->period()->single_start =3D "11:00"; $job->run_time()->at('2006-12-24 12:20'); $job->run_time()->at('2006-12-24 12:25'); $job->run_time()->at('2006-12-24 12:35'); /** A period for day=3D1 */ $p =3D $job->run_time()->weekdays('1')->period(); $p->single_start =3D '07:30'; $job_command =3D &get_instance('SOS_Scheduler_JobCommand_Launcher','sch= eduler/'); //First removing the job =20 $job_command->remove($job->name); if (! $job_command->add_jobs($job)) { =09echo'error occurred adding job: ' . $job_command->get_error(); =09exit; }
<j= ob force_idle_timeout=3D"yes" idle_timeout=3D"1000" ignore_signals=3D"all" java_options=3D"java" min_tasks=3D"2" name=3D"test_jobname3" order=3D"no" priority=3D"1" stop_on_error=3D"no" tasks=3D"4" temporary=3D"no" imeout=3D"10" itle=3D"my job" isible=3D"yes"> <params> param name=3D"var1" value=3D"value1"/> param name=3D"var2" value=3D"value2"/> </params> <script language=3D"javascript"> ![CDATA[a=3D1;]]></script> <run_time> period single_start=3D"10:00"/> period single_start=3D"11:00"/> at at=3D"2006-12-24 12:20"/> at at=3D"2006-12-24 12:25"/> at at=3D"2006-12-24 12:35"/> weekdays> day day=3D"1"> period single_start=3D"07:30"/> day> </weekdays> </run_time> </job>
//------------------------------------------------------------------= ------ =20 // How to to delete a job=20 //------------------------------------------------------------------------ = =20 // First we add the job to have one, which we can remove $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); $job->name =3D "jobtoberemoved"; $job->title =3D "my removed job"; $job->visible =3D "yes";=20 //Set the implentation $job->script('javascript')->script_source=3D'a=3D1;'; $job_command =3D &get_instance('SOS_Scheduler_JobCommand_Launcher','sch= eduler/'); if (! $job_command->add_jobs($job)) { echo'error occurred adding job: ' . $job_command->get_error(); exit; } //Now the job will be removed if (! $job_command->remove($job->name)) { =09echo'error occurred removing job: ' . $job_command->get_error();=20 =09exit; }
Generated XML
= <job name=3D"jobtoberemoved" tasks=3D"1" temporary=3D"no" title=3D"my removed job" visible=3D"yes"> <script language=3D"javascript"> <![CDATA[a=3D1;]]> </script> </job> <modify_job job=3D"jobtoberemoved" cmd=3D"remove"/>
//------------------------------------------------------------------= ------ // How to Start a job //------------------------------------------------------------------------ // First we add the job to have one, which we can start $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); $job->name =3D "test_jobname3";=20 $job->title =3D "my job"; $job->visible =3D "yes";=20 $job->script('javascript')->script_source=3D'a=3D1'; $job_command =3D &get_instance('SOS_Scheduler_JobCommand_Launcher','sch= eduler/'); if (! $job_command->add_jobs($job)) { =09echo'error occurred adding job: ' . $job_command->get_error(); exit; } if (! $job_command->start($name=3D'test_jobname3', $start_at=3D"now" )) = { =09echo'error occurred submitting job: ' . $job_command->get_error(); =09exit; }
&l= t;start_job job=3D"test_jobname3" at=3D"now"></start_job>
//------------------------------------------------------------------= - // How to set the runtime of a job. Some examples //------------------------------------------------------------------- // First we add the job to have one, which we can start $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); $job->name =3D "test_jobname33";=20 $job->title =3D "test_jobname33"; $job->visible =3D "yes"; =20 $job->script('javascript')->script_source=3D'a=3D1'; $job_command =3D &get_instance('SOS_Scheduler_JobCommand_Launcher','sch= eduler/'); if (! $job_command->add_jobs($job)) {echo'error occurred adding job: ' = . $job_command->get_error(); exit; } //Start on the 28.st at 11:00 $job->run_time()->monthdays('28')->period()->single_start=3D'11= :00'; //Adding a period=20 $period =3D new SOS_Scheduler_Runtime_Period(); $period->begin=3D'12:00'; $period->end=3D'13:00'; $period->repeat=3D'60'; $job->run_time()->date('2006-30-11')->addPeriod($period); //starting at 11:00 $job->run_time()->at('11:00'); if (!$job_command->execute($job)) {echo'error occurred : ' . $job_comman= d->get_error(); exit; }
&l= t;job name=3D"test_jobname33" tasks=3D"1" title=3D"test_jobname33" visible=3D"yes"> <script language=3D"javascript"><![CDATA[a=3D1]]></script>= ; <run_time> <at at=3D"11:00"/> <date date=3D"2006-30-11"> <period begin=3D"12:00" end=3D"13:00" repeat=3D"60"/> </date> <monthdays> <day day=3D"28"> <period single_start=3D"11:00"/> </day> </monthdays> </run_time> </job>
//-------------------------------------------------------------- //How to set the runtime of an order. Some examples //-------------------------------------------------------------- //adding an order with a runtime $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher'= ,'scheduler/'); $order =3D $order_launcher->add_order('jobchain',3); $order->replace=3D'yes'; $order->id=3D'sostest_14'; //Start on the 28.st at 11:00 $order->run_time()->monthdays('28')->period()->single_start=3D'= 12:00'; //Adding a period=20 $period =3D new SOS_Scheduler_Runtime_Period(); $period->begin=3D'12:00'; $period->end=3D'13:00'; $period->repeat=3D'60'; $order->run_time()->ultimos('22')->addPeriod($period); //starting at 11:00=20 $order->at=3D'2008-11-01 13:00'; if (!$order_launcher->execute($order)) {echo'error occurred adding order= : ' . $order_launcher->get_error(); exit; }
&= lt;add_order at=3D"2008-11-01 13:00" id=3D"sostest_14" job_chain=3D"jobchain" replace=3D"yes" state=3D"3"> <run_time> <monthdays> <day day=3D"28"> <period single_start=3D"12:00"/> </day></monthdays> <ultimos> <day day=3D"22"> <period begin=3D"12:00" end=3D"13:00" repeat=3D"60"/> </day> </ultimos> </run_time> </add_order>
// = First we add the job to have one, which we can start $job =3D &get_instance('SOS_Scheduler_Job','scheduler/'); $job->name =3D "test_jobname77";=20 $job->title =3D "test_jobname77"; $job->visible =3D "yes"; =20 $job->script('javascript')->script_source=3D'a=3D1'; $modify_hot_folder_command =3D &get_instance('SOS_Scheduler_HotFolder_L= auncher','scheduler/'); if (! $xml=3D$modify_hot_folder_command->store($job,"./test")) { =09echo'error occurred adding job: ' . $modify_hot_folder_command->get_e= rror(); =09exit; }
Generated XML
<modi= fy_hot_folder folder=3D"./test"> <job name=3D"test_jobname77" tasks=3D"1" temporary=3D"no" title=3D"te= st_jobname77" visible=3D"yes"> <script language=3D"javascript"><![CDATA[a=3D1]]></scri= pt> </job> </modify_hot_folder>
//-= ------------------------------------------------- // How to add a lock to hot folder //-------------------------------------------------- // First we add the lock to have one, which we can start $lock =3D &get_instance('SOS_Scheduler_Lock','scheduler/'); //Setting some properties $lock->max_non_exclusive =3D 1; $lock->name=3D"myLock"; //Adding the lock to the hotfolder $modify_hot_folder_command =3D &get_instance('SOS_Scheduler_HotFolder_L= auncher','scheduler/'); if (! $xml=3D$modify_hot_folder_command->store($lock,"./test")) { =09echo'error occurred adding lock: ' . $modify_hot_folder_command->get_= error();=20 =09exit; }
<modi= fy_hot_folder folder=3D"./test"> <lock name=3D"myLock" max_non_exclusive=3D"1"></lock> </modify_hot_folder>
//-------= ------------------------------------------------------------------ // How to add a process_class to hot folder //------------------------------------------------------------------------- // First we add the process_class to have one, which we can start $process_class =3D &get_instance('SOS_Scheduler_Process_class','schedul= er/'); //Setting some properties $process_class->max_processes =3D 1; $process_class->name=3D
&l= t;modify_hot_folder folder=3D"./test"> <process_class name=3D"myProcess_class" max_processes=3D"1" replace=3D"yes"> </process_class> </modify_hot_folder>
//-------= ------------------------------------------------------ // How to add a job_chain to hot folder //------------------------------------------------------------- $job_chain =3D &get_instance('SOS_Scheduler_Job_Chain','scheduler/'); //Setting some properties $job_chain->name =3D "myJob_Chain"; //The job has a file_order_sources=20 $job_chain->file_order_source("/myDir","1"); $job_chain->file_order_source("/myOtherDir","2"); //The job has a file_order_sinks $job_chain->file_order_sink("6") ->remove=3D"yes"; $job_chain->file_order_sink("99") ->remove=3D"yes"; $job_chain->file_order_sink("999")->remove=3D"yes"; //Adding some Job_chain_nodes $job_chain->add_job("my_job1","1","2","99"); $job_chain->add_job("my_job2","2","3","99"); $job_chain->add_job("my_job3","3","4","99"); $job_chain->add_job("my_job4","4","5","999"); //or adding a node $job_chain_node =3D new SOS_Scheduler_Job_Chain_Node(); //Setting some properties $job_chain_node->state =3D "5"; =20 $job_chain_node->error_state =3D "99"; =20 $job_chain_node->next_state =3D "6"; =20 $job_chain_node->on_error =3D "suspend"; $job_chain_node->job =3D "myJob5"; //adding the node $job_chain->add_node($job_chain_node); //Adding the job_chain to the hotfolder $modify_hot_folder_command =3D &get_instance('SOS_Scheduler_HotFolder_L= auncher','scheduler/'); if (! $xml=3D$modify_hot_folder_command->store($job_chain,"./test/chains= ")) { =09echo'error occurred adding job chain: ' . $modify_hot_folder_command->= ;get_error(); =09exit; }
Generated XML
&l= t;modify_hot_folder folder=3D"./test/chains"> <job_chain name=3D"myJob_Chain"> <file_order_source directory=3D"/myDir"/> <file_order_source directory=3D"/myOtherDir"/> <file_order_sink state=3D"6" remove=3D"yes"/> <file_order_sink state=3D"99" remove=3D"yes"/> <file_order_sink state=3D"999" remove=3D"yes"/> <job_chain_node job=3D"my_job1" state=3D"1" next_state=3D"2" error_s= tate=3D"99"/> <job_chain_node job=3D"my_job2" state=3D"2" next_state=3D"3" error_s= tate=3D"99"/> <job_chain_node job=3D"my_job3" state=3D"3" next_state=3D"4" error_s= tate=3D"99"/> <job_chain_node job=3D"my_job4" state=3D"4" next_state=3D"5" error_s= tate=3D"999"/> <job_chain_node job=3D"myJob5" state=3D"5" next_state=3D"6" error_st= ate=3D"99"/> </job_chain> </modify_hot_folder>
//-------= ------------------------------------------------------ // How to add an order to a hot_folder //------------------------------------------------------------- $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher'= ,'scheduler/'); //Create an order object (SOS_Scheduler_Command_Order). $order =3D $order_launcher->order('myJob_Chain',1); //Setting some properties of the order object $order->id=3D'my_Order'; $order->replace=3D"yes"; $order->priority=3D"10";=20 $order->title=3D"Testorder";=20 $order->web_service=3D"";=20 $order->at=3D"now+60"; $order->addParam('test','any value'); //Adding the job_chain to the hotfolder $modify_hot_folder_command =3D &get_instance('SOS_Scheduler_HotFolder_L= auncher','scheduler/'); if (! $xml=3D$modify_hot_folder_command->store($order,"./test/chains")) = {=20 =09echo 'error occurred adding order: ' . $modify_hot_folder_command->ge= t_error(); =09exit;=20 }=20
Generated XML
<modi= fy_hot_folder folder=3D"./test/chains"> <order at=3D"now+60" id=3D"my_Order" job_chain=3D"myJob_Chain" priority= =3D"10" replace=3D"yes" state=3D"1" title=3D"Testorder"> <params> <param name=3D"test" value=3D"any value"/> </params> </order> </modify_hot_folder>
//-------= ------------------------------------------------------ // How to add an order to a hot_folder //------------------------------------------------------------- $order_launcher =3D &get_instance('SOS_Scheduler_OrderCommand_Launcher'= ,'scheduler/'); //Create an order object (SOS_Scheduler_Command_Order). $order =3D $order_launcher->order('myJob_Chain',1); //Setting some properties of the order object $order->id=3D'my_Order'; $order->replace=3D"yes"; $order->priority=3D"10";=20 $order->title=3D"Testorder";=20 $order->web_service=3D"";=20 $order->at=3D"now+60"; $order->addParam('test','any value'); //Adding the job_chain to the hotfolder $modify_hot_folder_command =3D &get_instance('SOS_Scheduler_HotFolder_L= auncher','scheduler/'); if (! $xml=3D$modify_hot_folder_command->store($order,"./test/chains")) = { =09echo'error occurred adding order: ' . $modify_hot_folder_command->get= _error(); =09exit;=20 }
Generated XML
&l= t;modify_hot_folder> <job_chain name=3D"myNestedJob_Chain"> <job_chain_node.job_chain job_chain=3D"myJob_Chain" state=3D"100" next_state=3D"200" error_state=3D"1200"/> <job_chain_node.job_chain job_chain=3D"myNext_Chain" state=3D"200" next_state=3D"300" error_state=3D"1200"/> <job_chain_node.end state=3D"1200"/> <job_chain_node.end state=3D"300"/> </job_chain> </modify_hot_folder>