Changeset 2372 for sandbox/workflow/trunk/inc/engine/src/API
- Timestamp:
- 03/29/10 14:46:01 (14 years ago)
- Location:
- sandbox/workflow/trunk/inc/engine/src/API
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/engine/src/API/BaseActivity.php
r795 r2372 97 97 * @access public 98 98 */ 99 function BaseActivity( &$db)99 function BaseActivity() 100 100 { 101 101 $this->type='base'; 102 102 $this->child_name = 'BaseActivity'; 103 parent::Base( $db);103 parent::Base(); 104 104 } 105 105 … … 122 122 if(!$result || !$result->numRows() ) return false; 123 123 $res = $result->fetchRow(); 124 124 125 switch($res['wf_type']) { 125 126 case 'start': 126 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'Start.php');127 $act = new Start($this->db);128 break; 127 $act = &Factory::newInstance('Start'); 128 break; 129 129 130 case 'end': 130 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'End.php');131 $act = new End($this->db);132 break; 131 $act = &Factory::newInstance('End'); 132 break; 133 133 134 case 'join': 134 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'Join.php');135 $act = new Join($this->db);136 break; 135 $act = &Factory::newInstance('Join'); 136 break; 137 137 138 case 'split': 138 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'Split.php');139 $act = new Split($this->db);140 break; 139 $act = &Factory::newInstance('Split'); 140 break; 141 141 142 case 'standalone': 142 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'Standalone.php');143 $act = new Standalone($this->db);144 break; 143 $act = &Factory::newInstance('Standalone'); 144 break; 145 145 146 case 'view': 146 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'View.php');147 $act = new View($this->db);148 break; 147 $act = &Factory::newInstance('View'); 148 break; 149 149 150 case 'switch': 150 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'SwitchActivity.php');151 $act = new SwitchActivity($this->db);152 break; 151 $act = &Factory::newInstance('SwitchActivity'); 152 break; 153 153 154 case 'activity': 154 require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'activities'.SEP.'Activity.php');155 $act = new Activity($this->db);156 break; 155 $act = &Factory::newInstance('Activity'); 156 break; 157 157 158 default: 158 159 trigger_error('Unknown activity type:'.$res['wf_type'],E_USER_WARNING); 159 160 } 160 161 161 162 $act->setName($res['wf_name']); 162 163 $act->setProcessId($res['wf_p_id']); -
sandbox/workflow/trunk/inc/engine/src/API/Instance.php
r795 r2372 1 1 <?php 2 2 require_once (GALAXIA_LIBRARY.SEP.'src'.SEP.'common'.SEP.'Base.php'); 3 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'common' . SEP . 'WfSecurity.php');4 3 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ActivityManager.php'); 5 4 … … 141 140 142 141 var $activityID = null; 143 function Instance( $db)142 function Instance() 144 143 { 145 144 $this->child_name = 'Instance'; 146 parent::Base( $db);145 parent::Base(); 147 146 } 148 147 … … 1171 1170 1172 1171 //lock rows and ensure access is granted 1173 if (!(isset($this->security))) $this->security = & new WfSecurity($this->db);1172 if (!(isset($this->security))) $this->security = &Factory::getInstance('WfSecurity', $this->db); 1174 1173 if (!($this->security->checkUserAction($activityId,$this->instanceId,'complete'))) 1175 1174 { … … 1551 1550 { 1552 1551 //we check rights for this user on the next activity 1553 if (!(isset($this->security))) $this->security = & new WfSecurity($this->db);1552 if (!(isset($this->security))) $this->security = &Factory::getInstance('WfSecurity'); 1554 1553 if ($this->security->checkUserAccess($the_next_user,$activityId)) 1555 1554 { … … 1560 1559 { 1561 1560 // then check to see if there is a default user 1562 $activity_manager = & new ActivityManager($this->db);1561 $activity_manager = &Factory::newInstance('ActivityManager'); 1563 1562 //get_default_user will give us '*' if there is no default_user or if the default user has no role 1564 1563 //mapped anymore -
sandbox/workflow/trunk/inc/engine/src/API/Process.php
r795 r2372 48 48 * @access public 49 49 */ 50 function Process( &$db)50 function Process() 51 51 { 52 52 $this->child_name = 'Process'; 53 parent::Base( $db);53 parent::Base(); 54 54 } 55 55 -
sandbox/workflow/trunk/inc/engine/src/API/activities/Activity.php
r795 r2372 16 16 * @access public 17 17 */ 18 function Activity( &$db)18 function Activity() 19 19 { 20 parent::Base( $db);20 parent::Base(); 21 21 $this->child_name = 'Activity'; 22 22 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/End.php
r795 r2372 15 15 * @access public 16 16 */ 17 function End( &$db)17 function End() 18 18 { 19 parent::Base( $db);19 parent::Base(); 20 20 $this->child_name = 'End'; 21 21 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/Join.php
r795 r2372 15 15 * @access public 16 16 */ 17 function Join( &$db)17 function Join() 18 18 { 19 parent::Base( $db);19 parent::Base(); 20 20 $this->child_name = 'Join'; 21 21 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/Split.php
r795 r2372 15 15 * @access public 16 16 */ 17 function Split( &$db)17 function Split() 18 18 { 19 parent::Base( $db);19 parent::Base(); 20 20 $this->child_name = 'Split'; 21 21 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/Standalone.php
r795 r2372 15 15 * @access public 16 16 */ 17 function Standalone( &$db)17 function Standalone() 18 18 { 19 parent::Base( $db);19 parent::Base(); 20 20 $this->child_name = 'Standalone'; 21 21 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/Start.php
r795 r2372 15 15 * @access public 16 16 */ 17 function Start( &$db)17 function Start() 18 18 { 19 parent::Base( $db);19 parent::Base(); 20 20 $this->child_name = 'Start'; 21 21 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/SwitchActivity.php
r795 r2372 16 16 * @access public 17 17 */ 18 function SwitchActivity( &$db)18 function SwitchActivity() 19 19 { 20 parent::Base( $db);20 parent::Base(); 21 21 $this->child_name = 'Switch'; 22 22 } -
sandbox/workflow/trunk/inc/engine/src/API/activities/View.php
r795 r2372 16 16 * @access public 17 17 */ 18 function View( &$db)18 function View() 19 19 { 20 parent::Base( $db);20 parent::Base(); 21 21 $this->child_name = 'View'; 22 22 }
Note: See TracChangeset
for help on using the changeset viewer.