[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 //Code to be executed before an activity by agents 3 4 //retrieve agents list 5 $activity_agents =& $this->activity->getAgents(); 6 //for all agents we create ui_agent object to handle agents executing tasks 7 foreach ($activity_agents as $agent) 8 { 9 //create an empty temp ui_agent object 10 $ui_agent =& createObject('workflow.ui_agent_'.$agent['wf_agent_type']); 11 //build this object 12 $ui_agent->load($agent['wf_agent_id']); 13 //At runtime agents need to handle relations with the instance and the activity 14 $ui_agent->runtime($instance, $activity); 15 //store it in an array 16 $this->agents[$agent['wf_agent_type']] = $ui_agent; 17 //delete the temp object 18 unset($ui_agent); 19 } 20 21 if (!($GLOBALS['workflow']['__leave_activity'])) 22 { 23 foreach ($this->agents as $agent_type => $ui_agent) 24 { 25 if (!($ui_agent->run_activity_pre())) 26 { 27 galaxia_show_error($ui_agent->get_error(),false); 28 } 29 30 } 31 } 32 else 33 { 34 foreach ($this->agents as $agent_type => $ui_agent) 35 { 36 if (!($ui_agent->run_leaving_activity_pre())) 37 { 38 galaxia_show_error($ui_agent->get_error(), false); 39 } 40 } 41 } 42 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |