- Timestamp:
- 03/29/10 14:46:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/engine/src/ProcessManager/ProcessManager.php
r2165 r2372 66 66 * @access public 67 67 */ 68 function ProcessManager( &$db)69 { 70 parent::BaseManager( $db);68 function ProcessManager() 69 { 70 parent::BaseManager(); 71 71 $this->child_name = 'ProcessManager'; 72 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager'.SEP.'ActivityManager.php');73 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager'.SEP.'JobManager.php');74 72 // $this->activity_manager is not set here to avoid objects loading object A loading object B loading object A, etc 75 73 //$this->role_manager will only be loaded when needed as well … … 131 129 function serialize_process($pId) 132 130 { 133 if (!(isset($this->activity_manager))) $this->activity_manager = new ActivityManager($this->db);131 if (!(isset($this->activity_manager))) $this->activity_manager = &Factory::newInstance('ActivityManager'); 134 132 // <process> 135 133 $out = '<process>'."\n"; … … 459 457 { 460 458 //Now the show begins 461 if (!(isset($this->activity_manager))) $this->activity_manager = new ActivityManager($this->db);462 if (!(isset($this->role_manager))) $this->role_manager = new RoleManager($this->db);459 if (!(isset($this->activity_manager))) $this->activity_manager = &Factory::newInstance('ActivityManager'); 460 if (!(isset($this->role_manager))) $this->role_manager = &Factory::newInstance('RoleManager'); 463 461 if (!isset($this->jobManager)) 464 $this->jobManager = new JobManager($this->db);462 $this->jobManager = &Factory::newInstance('JobManager'); 465 463 466 464 // First create the process. Always inactive and inactive first. … … 620 618 function new_process_version($pId, $minor=true) 621 619 { 622 if (!(isset($this->activity_manager))) $this->activity_manager = new ActivityManager($this->db);620 if (!(isset($this->activity_manager))) $this->activity_manager = &Factory::newInstance('ActivityManager'); 623 621 $oldpid = $pId; 624 622 //retrieve process info with config rows … … 671 669 } 672 670 // create roles 673 if (!(isset($this->role_manager))) $this->role_manager = new RoleManager($this->db);671 if (!(isset($this->role_manager))) $this->role_manager = &Factory::newInstance('RoleManager'); 674 672 $query = 'select * from '.GALAXIA_TABLE_PREFIX.'roles where wf_p_id=?'; 675 673 $result = $this->query($query, array($oldpid)); … … 853 851 function remove_process($pId) 854 852 { 855 if (!(isset($this->activity_manager))) $this->activity_manager = new ActivityManager($this->db);853 if (!(isset($this->activity_manager))) $this->activity_manager = &Factory::newInstance('ActivityManager'); 856 854 if (!isset($this->jobManager)) 857 $this->jobManager = new JobManager($this->db);855 $this->jobManager = &Factory::newInstance('JobManager'); 858 856 $this->deactivate_process($pId); 859 857 $name = $this->_get_normalized_name($pId); … … 919 917 function replace_process($pId, &$vars, $create = true) 920 918 { 921 if (!(isset($this->activity_manager))) $this->activity_manager = new ActivityManager($this->db);919 if (!(isset($this->activity_manager))) $this->activity_manager = &Factory::newInstance('ActivityManager'); 922 920 $TABLE_NAME = GALAXIA_TABLE_PREFIX.'processes'; 923 921 $now = date("U"); … … 1296 1294 { 1297 1295 //Warning: this means you have to include the Process.php from the API 1298 $this->Process = new Process($this->db);1296 $this->Process = &Factory::newInstance('Process'); 1299 1297 $this->Process->getProcess($pId); 1300 1298 $result_array = $this->Process->getConfigValues($config_array); … … 1316 1314 { 1317 1315 //Warning: this means you have to include the Process.php from the API 1318 $this->Process = new Process($this->db);1316 $this->Process = &Factory::newInstance('Process'); 1319 1317 $this->Process->getProcess($pId); 1320 1318 $this->Process->setConfigValues($config_array);
Note: See TracChangeset
for help on using the changeset viewer.