Ignore:
Timestamp:
03/29/10 14:46:01 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Merged 2197:2356 /sandbox/workflow/branches/609/ em /sandbox/workflow/trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/trunk/inc/local/classes/class.wf_engine.php

    r795 r2372  
    6868                $flagObject[0] = is_null($this->processManager); 
    6969                if ($flagObject[0]) 
    70                         $this->processManager = CreateObject('workflow.workflow_processmanager'); 
     70                        $this->processManager = Factory::getInstance('workflow_processmanager'); 
    7171 
    7272                $output = array(); 
     
    9090        function continueInstance($activityID, $instanceID) 
    9191        { 
    92                 require_once 'class.wf_instance.php'; 
    93                 $WFInstance = new wf_instance(); 
     92                $WFInstance = &Factory::getInstance('wf_instance'); 
    9493                return $WFInstance->continueInstance($activityID, $instanceID); 
    9594        } 
     
    104103        function abortInstance($instanceID) 
    105104        { 
    106                 require_once 'class.wf_instance.php'; 
    107                 $WFInstance = new wf_instance(); 
     105                $WFInstance = &Factory::getInstance('wf_instance'); 
    108106                return $WFInstance->abort($instanceID); 
    109107        } 
     
    119117        function setInstanceName($instanceID, $name) 
    120118        { 
    121                 require_once 'class.wf_instance.php'; 
    122                 $WFInstance = new wf_instance(); 
     119                $WFInstance = &Factory::getInstance('wf_instance'); 
    123120                return $WFInstance->setName($instanceID, $name); 
    124121        } 
     
    134131        function setInstancePriority($instanceID, $priority) 
    135132        { 
    136                 require_once 'class.wf_instance.php'; 
    137                 $WFInstance = new wf_instance(); 
     133                $WFInstance = &Factory::getInstance('wf_instance'); 
    138134                return $WFInstance->setPriority($instanceID, $priority); 
    139135        } 
     
    149145        function getIdleInstances($numberOfDays, $activities = null) 
    150146        { 
    151                 require_once 'class.wf_instance.php'; 
    152                 $WFInstance = new wf_instance(); 
     147                $WFInstance = &Factory::getInstance('wf_instance'); 
    153148                return $WFInstance->getIdle($numberOfDays, $activities); 
    154149        } 
     
    175170        function getInstancesByName($name) 
    176171        { 
    177                 require_once 'class.wf_instance.php'; 
    178                 $WFInstance = new wf_instance(); 
     172                $WFInstance = &Factory::getInstance('wf_instance'); 
    179173                $preOutput = $WFInstance->getByName($name); 
    180174                $output = array(); 
     
    197191        function getChildInstances($instanceID = null, $activityID = null) 
    198192        { 
    199                 require_once 'class.wf_instance.php'; 
    200                 $WFInstance = new wf_instance(); 
     193                $WFInstance = &Factory::getInstance('wf_instance'); 
    201194                $preOutput = $WFInstance->getChildren($instanceID, $activityID); 
    202195                $output = array(); 
     
    217210        function getInstanceProperties($instanceID) 
    218211        { 
    219                 require_once 'class.wf_instance.php'; 
    220                 $WFInstance = new wf_instance(); 
     212                $WFInstance = &Factory::getInstance('wf_instance'); 
    221213                return $WFInstance->getProperties($instanceID); 
    222214        } 
     
    231223        function getChildInstanceProperties($instanceID) 
    232224        { 
    233                 require_once 'class.wf_instance.php'; 
    234                 $WFInstance = new wf_instance(); 
     225                $WFInstance = &Factory::getInstance('wf_instance'); 
    235226                return $WFInstance->getProperties($instanceID); 
    236227        } 
     
    247238                $flagObject[0] = is_null($this->acl); 
    248239                if ($flagObject[0]) 
    249                         $this->acl = CreateObject('workflow.workflow_acl'); 
     240                        $this->acl = Factory::getInstance('workflow_acl'); 
    250241 
    251242                $output = $this->acl->getUserPermissions($type, $uid); 
     
    268259                $flagObject[0] = is_null($this->acl); 
    269260                if ($flagObject[0]) 
    270                         $this->acl = CreateObject('workflow.workflow_acl'); 
     261                        $this->acl = Factory::getInstance('workflow_acl'); 
    271262 
    272263                $output = $this->acl->getUserGroupPermissions($type, $uid); 
     
    346337        function getUserInstances($users, $activities = null, $status = null) 
    347338        { 
    348                 require_once 'class.wf_instance.php'; 
    349                 $WFInstance = new wf_instance(); 
     339                $WFInstance = &Factory::getInstance('wf_instance'); 
    350340                return $WFInstance->getByUser($users, $activities, $status); 
    351341        } 
     
    360350        function setInstanceProperty($instanceID, $nameProperty, $value) 
    361351        { 
    362                 require_once 'class.wf_instance.php'; 
    363                 $WFInstance = new wf_instance(); 
     352                $WFInstance = &Factory::getInstance('wf_instance'); 
    364353                return $WFInstance->setProperty($instanceID, $nameProperty, $value); 
    365354        } 
     
    377366        function checkUserAccessToInstance($userID, $instanceID, $activityID, $writeAccess = true) 
    378367        { 
    379                 require_once 'class.wf_instance.php'; 
    380                 $WFInstance = new wf_instance(); 
     368                $WFInstance = &Factory::getInstance('wf_instance'); 
    381369                return $WFInstance->checkUserAccess($userID, $instanceID, $activityID, $writeAccess); 
    382370        } 
Note: See TracChangeset for help on using the changeset viewer.