- Timestamp:
- 03/29/10 14:46:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/inc/local/classes/class.wf_engine.php
r795 r2372 68 68 $flagObject[0] = is_null($this->processManager); 69 69 if ($flagObject[0]) 70 $this->processManager = CreateObject('workflow.workflow_processmanager');70 $this->processManager = Factory::getInstance('workflow_processmanager'); 71 71 72 72 $output = array(); … … 90 90 function continueInstance($activityID, $instanceID) 91 91 { 92 require_once 'class.wf_instance.php'; 93 $WFInstance = new wf_instance(); 92 $WFInstance = &Factory::getInstance('wf_instance'); 94 93 return $WFInstance->continueInstance($activityID, $instanceID); 95 94 } … … 104 103 function abortInstance($instanceID) 105 104 { 106 require_once 'class.wf_instance.php'; 107 $WFInstance = new wf_instance(); 105 $WFInstance = &Factory::getInstance('wf_instance'); 108 106 return $WFInstance->abort($instanceID); 109 107 } … … 119 117 function setInstanceName($instanceID, $name) 120 118 { 121 require_once 'class.wf_instance.php'; 122 $WFInstance = new wf_instance(); 119 $WFInstance = &Factory::getInstance('wf_instance'); 123 120 return $WFInstance->setName($instanceID, $name); 124 121 } … … 134 131 function setInstancePriority($instanceID, $priority) 135 132 { 136 require_once 'class.wf_instance.php'; 137 $WFInstance = new wf_instance(); 133 $WFInstance = &Factory::getInstance('wf_instance'); 138 134 return $WFInstance->setPriority($instanceID, $priority); 139 135 } … … 149 145 function getIdleInstances($numberOfDays, $activities = null) 150 146 { 151 require_once 'class.wf_instance.php'; 152 $WFInstance = new wf_instance(); 147 $WFInstance = &Factory::getInstance('wf_instance'); 153 148 return $WFInstance->getIdle($numberOfDays, $activities); 154 149 } … … 175 170 function getInstancesByName($name) 176 171 { 177 require_once 'class.wf_instance.php'; 178 $WFInstance = new wf_instance(); 172 $WFInstance = &Factory::getInstance('wf_instance'); 179 173 $preOutput = $WFInstance->getByName($name); 180 174 $output = array(); … … 197 191 function getChildInstances($instanceID = null, $activityID = null) 198 192 { 199 require_once 'class.wf_instance.php'; 200 $WFInstance = new wf_instance(); 193 $WFInstance = &Factory::getInstance('wf_instance'); 201 194 $preOutput = $WFInstance->getChildren($instanceID, $activityID); 202 195 $output = array(); … … 217 210 function getInstanceProperties($instanceID) 218 211 { 219 require_once 'class.wf_instance.php'; 220 $WFInstance = new wf_instance(); 212 $WFInstance = &Factory::getInstance('wf_instance'); 221 213 return $WFInstance->getProperties($instanceID); 222 214 } … … 231 223 function getChildInstanceProperties($instanceID) 232 224 { 233 require_once 'class.wf_instance.php'; 234 $WFInstance = new wf_instance(); 225 $WFInstance = &Factory::getInstance('wf_instance'); 235 226 return $WFInstance->getProperties($instanceID); 236 227 } … … 247 238 $flagObject[0] = is_null($this->acl); 248 239 if ($flagObject[0]) 249 $this->acl = CreateObject('workflow.workflow_acl');240 $this->acl = Factory::getInstance('workflow_acl'); 250 241 251 242 $output = $this->acl->getUserPermissions($type, $uid); … … 268 259 $flagObject[0] = is_null($this->acl); 269 260 if ($flagObject[0]) 270 $this->acl = CreateObject('workflow.workflow_acl');261 $this->acl = Factory::getInstance('workflow_acl'); 271 262 272 263 $output = $this->acl->getUserGroupPermissions($type, $uid); … … 346 337 function getUserInstances($users, $activities = null, $status = null) 347 338 { 348 require_once 'class.wf_instance.php'; 349 $WFInstance = new wf_instance(); 339 $WFInstance = &Factory::getInstance('wf_instance'); 350 340 return $WFInstance->getByUser($users, $activities, $status); 351 341 } … … 360 350 function setInstanceProperty($instanceID, $nameProperty, $value) 361 351 { 362 require_once 'class.wf_instance.php'; 363 $WFInstance = new wf_instance(); 352 $WFInstance = &Factory::getInstance('wf_instance'); 364 353 return $WFInstance->setProperty($instanceID, $nameProperty, $value); 365 354 } … … 377 366 function checkUserAccessToInstance($userID, $instanceID, $activityID, $writeAccess = true) 378 367 { 379 require_once 'class.wf_instance.php'; 380 $WFInstance = new wf_instance(); 368 $WFInstance = &Factory::getInstance('wf_instance'); 381 369 return $WFInstance->checkUserAccess($userID, $instanceID, $activityID, $writeAccess); 382 370 }
Note: See TracChangeset
for help on using the changeset viewer.