Ignore:
Timestamp:
03/19/10 17:22:08 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Migrando instanciação das classes da engine para a factory.

Location:
sandbox/workflow/branches/609/inc/engine
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/engine/config.ajax.inc.php

    r2233 r2311  
    256256        function galaxia_get_config_values($parameters=array()) 
    257257        { 
    258                         $config = new ajax_config(); 
     258                        $config = &Factory::getInstance('ajax_config'); 
    259259                        $config->read_repository(); 
    260260 
  • sandbox/workflow/branches/609/inc/engine/src/API/BaseActivity.php

    r795 r2311  
    9797   * @access public 
    9898   */ 
    99   function BaseActivity(&$db) 
     99  function BaseActivity() 
    100100  { 
    101101    $this->type='base'; 
    102102    $this->child_name = 'BaseActivity'; 
    103     parent::Base($db); 
     103    parent::Base(); 
    104104  } 
    105105 
     
    122122    if(!$result || !$result->numRows() ) return false; 
    123123    $res = $result->fetchRow(); 
     124 
    124125    switch($res['wf_type']) { 
    125126      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 
    129130      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 
    133134      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 
    137138      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 
    141142      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 
    145146      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 
    149150      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 
    153154      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 
    157158      default: 
    158159        trigger_error('Unknown activity type:'.$res['wf_type'],E_USER_WARNING); 
    159160    } 
    160      
     161 
    161162    $act->setName($res['wf_name']); 
    162163    $act->setProcessId($res['wf_p_id']); 
  • sandbox/workflow/branches/609/inc/engine/src/API/Instance.php

    r795 r2311  
    11<?php 
    22require_once (GALAXIA_LIBRARY.SEP.'src'.SEP.'common'.SEP.'Base.php'); 
    3 require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'common' . SEP . 'WfSecurity.php'); 
    43require_once(GALAXIA_LIBRARY . SEP . 'src' . SEP . 'ProcessManager' . SEP . 'ActivityManager.php'); 
    54 
     
    141140 
    142141  var $activityID = null; 
    143   function Instance($db)  
     142  function Instance()  
    144143  { 
    145144    $this->child_name = 'Instance'; 
    146     parent::Base($db); 
     145    parent::Base(); 
    147146  } 
    148147 
     
    11711170     
    11721171    //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); 
    11741173    if (!($this->security->checkUserAction($activityId,$this->instanceId,'complete'))) 
    11751174    { 
     
    15511550    { 
    15521551      //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'); 
    15541553      if ($this->security->checkUserAccess($the_next_user,$activityId)) 
    15551554      { 
     
    15601559    { 
    15611560      // then check to see if there is a default user 
    1562       $activity_manager =& new ActivityManager($this->db); 
     1561      $activity_manager = &Factory::newInstance('ActivityManager'); 
    15631562      //get_default_user will give us '*' if there is no default_user or if the default user has no role 
    15641563      //mapped anymore 
  • sandbox/workflow/branches/609/inc/engine/src/API/Process.php

    r795 r2311  
    4848         * @access public 
    4949         */ 
    50         function Process(&$db)  
     50        function Process()  
    5151        { 
    5252                $this->child_name = 'Process'; 
    53                 parent::Base($db); 
     53                parent::Base(); 
    5454        } 
    5555 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/Activity.php

    r795 r2311  
    1616         * @access public 
    1717         */ 
    18         function Activity(&$db) 
     18        function Activity() 
    1919        { 
    20                 parent::Base($db); 
     20                parent::Base(); 
    2121                $this->child_name = 'Activity'; 
    2222        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/End.php

    r795 r2311  
    1515         * @access public 
    1616         */ 
    17         function End(&$db) 
     17        function End() 
    1818        { 
    19                 parent::Base($db); 
     19                parent::Base(); 
    2020                $this->child_name = 'End'; 
    2121        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/Join.php

    r795 r2311  
    1515         * @access public 
    1616         */ 
    17         function Join(&$db) 
     17        function Join() 
    1818        { 
    19                 parent::Base($db); 
     19                parent::Base(); 
    2020                $this->child_name = 'Join'; 
    2121        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/Split.php

    r795 r2311  
    1515         * @access public 
    1616         */ 
    17         function Split(&$db) 
     17        function Split() 
    1818        { 
    19                 parent::Base($db); 
     19                parent::Base(); 
    2020                $this->child_name = 'Split'; 
    2121        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/Standalone.php

    r795 r2311  
    1515         * @access public 
    1616         */ 
    17         function Standalone(&$db) 
     17        function Standalone() 
    1818        { 
    19                 parent::Base($db); 
     19                parent::Base(); 
    2020                $this->child_name = 'Standalone'; 
    2121        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/Start.php

    r795 r2311  
    1515         * @access public 
    1616         */ 
    17         function Start(&$db) 
     17        function Start() 
    1818        { 
    19                 parent::Base($db); 
     19                parent::Base(); 
    2020                $this->child_name = 'Start'; 
    2121        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/SwitchActivity.php

    r795 r2311  
    1616         * @access public 
    1717         */ 
    18         function SwitchActivity(&$db) 
     18        function SwitchActivity() 
    1919        { 
    20            parent::Base($db); 
     20           parent::Base(); 
    2121           $this->child_name = 'Switch'; 
    2222        } 
  • sandbox/workflow/branches/609/inc/engine/src/API/activities/View.php

    r795 r2311  
    1616         * @access public 
    1717         */      
    18         function View(&$db) 
     18        function View() 
    1919        { 
    20                 parent::Base($db); 
     20                parent::Base(); 
    2121                $this->child_name = 'View'; 
    2222        } 
  • sandbox/workflow/branches/609/inc/engine/src/GUI/GUI.php

    r795 r2311  
    3232   * @access public 
    3333   */ 
    34   function GUI(&$db)  
     34  function GUI() 
    3535  { 
    3636    $this->child_name = 'GUI'; 
    37     parent::Base($db); 
    38     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'common'.SEP.'WfSecurity.php'); 
    39     $this->wf_security =& new WfSecurity($this->db);  
     37    parent::Base(); 
     38    $this->wf_security = &Factory::getInstance('WfSecurity'); 
    4039  } 
    4140 
     
    703702      if (!(isset($this->pm))) 
    704703      { 
    705         require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager'.SEP.'ProcessManager.php'); 
    706         $this->pm =& new ProcessManager($this->db); 
     704        $this->pm = &Factory::newInstance('ProcessManager'); 
    707705      } 
    708706      $this->process_cache[$pId]['view'] = $this->pm->get_process_view_activity($pId); 
     
    871869    { 
    872870      //the security object said everything was fine 
    873       $instance = new Instance($this->db); 
     871      $instance = &Factory::newInstance('Instance'); 
    874872      $instance->getInstance($instanceId); 
    875873      if (!empty($instance->instanceId))  
     
    975973    { 
    976974      //the security object said everything was fine 
    977       $instance =& new Instance($this->db); 
     975      $instance = &Factory::newInstance('Instance'); 
    978976      $instance->getInstance($instanceId); 
    979977      // we force the execution of the activity 
     
    10121010    { 
    10131011      //the security object said everything was fine 
    1014       $instance =& new Instance($this->db); 
     1012      $instance = &Factory::newInstance('Instance'); 
    10151013      $instance->getInstance($instanceId); 
    10161014      // we force the continuation of the flow 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/ActivityManager.php

    r795 r2311  
    2626   * @access public 
    2727   */ 
    28   function ActivityManager(&$db) 
    29   { 
    30     parent::BaseManager($db); 
     28  function ActivityManager() 
     29  { 
     30    parent::BaseManager(); 
    3131    $this->child_name = 'ActivityManager'; 
    3232    require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager' .SEP . 'ProcessManager.php'); 
     
    370370  function build_process_graph($pId) 
    371371  { 
    372     if (!(isset($this->process_manager))) $this->process_manager = new ProcessManager($this->db); 
     372    if (!(isset($this->process_manager))) $this->process_manager = &Factory::newInstance('ProcessManager'); 
    373373    $attributes = Array( 
    374374     
    375375    ); 
    376     $graph = new Process_GraphViz(true,$attributes); 
     376    $graph = &Factory::newInstance('Process_GraphViz', true, $attributes); 
    377377    $name = $this->process_manager->_get_normalized_name($pId); 
    378378    $graph->set_pid($name); 
     
    747747  { 
    748748    require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP . 'BaseActivity.php'); 
    749     $act = new BaseActivity($this->db); 
     749    $act = &Factory::newInstance('BaseActivity'); 
    750750    //Warning, we now use the BaseActivity object for it, interactivity and autorouting is now true/fales, not y/n 
    751751    return ($act->getActivity($activityId,false,true, true)); 
     
    825825  function remove_activity($pId, $activityId, $transaction = true) 
    826826  { 
    827     if (!(isset($this->process_manager))) $this->process_manager = new ProcessManager($this->db); 
     827    if (!(isset($this->process_manager))) $this->process_manager = &Factory::newInstance('ProcessManager'); 
    828828    $proc_info = $this->process_manager->get_process($pId); 
    829829    $actname = $this->_get_normalized_name($activityId); 
     
    888888  function replace_activity($pId, $activityId, $vars, $create_files=true) 
    889889  { 
    890     if (!(isset($this->process_manager))) $this->process_manager = new ProcessManager($this->db); 
     890    if (!(isset($this->process_manager))) $this->process_manager = &Factory::newInstance('ProcessManager'); 
    891891    $TABLE_NAME = GALAXIA_TABLE_PREFIX.'activities'; 
    892892    $now = date("U"); 
     
    11951195    elseif ( (!($result=='*')) && $performAccessCheck) 
    11961196    { 
    1197       $wf_security = new WfSecurity($this->db); 
     1197      $wf_security = &Factory::getInstance('WfSecurity', $this->db); 
    11981198      // perform the check 
    11991199      if (!($wf_security->checkUserAccess($result,$activityId))) 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/BaseManager.php

    r2165 r2311  
    1818   * @access public 
    1919   */ 
    20   function BaseManager(&$db) 
     20  function BaseManager() 
    2121  { 
    2222    $this->child_name = 'BaseManager'; 
    23     parent::Base($db); 
     23    parent::Base(); 
    2424  } 
    2525 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/InstanceManager.php

    r795 r2311  
    1616   * @access public 
    1717   */ 
    18   function InstanceManager(&$db)  
    19   { 
    20     parent::BaseManager($db); 
     18  function InstanceManager()  
     19  { 
     20    parent::BaseManager(); 
    2121    $this->child_name = 'InstanceManager'; 
    2222  } 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/JobManager.php

    r795 r2311  
    7676         * @access public 
    7777         */ 
    78         public function JobManager(&$db) 
    79         { 
    80                 parent::BaseManager($db); 
     78        public function JobManager() 
     79        { 
     80                parent::BaseManager(); 
    8181                $this->child_name = 'JobManager'; 
    8282 
    8383                $this->jobTable = GALAXIA_TABLE_PREFIX . 'jobs'; 
    8484                $this->logTable = GALAXIA_TABLE_PREFIX . 'job_logs'; 
    85                 $this->processManager = new ProcessManager($this->db); 
     85                $this->processManager = &Factory::newInstance('ProcessManager'); 
    8686        } 
    8787 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/ProcessManager.php

    r2165 r2311  
    6666         * @access public 
    6767         */ 
    68         function ProcessManager(&$db) 
    69         { 
    70                 parent::BaseManager($db); 
     68        function ProcessManager() 
     69        { 
     70                parent::BaseManager(); 
    7171                $this->child_name = 'ProcessManager'; 
    7272                require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager'.SEP.'ActivityManager.php'); 
     
    131131        function serialize_process($pId) 
    132132        { 
    133                 if (!(isset($this->activity_manager)))  $this->activity_manager = new ActivityManager($this->db); 
     133                if (!(isset($this->activity_manager)))  $this->activity_manager = &Factory::newInstance('ActivityManager'); 
    134134                // <process> 
    135135                $out = '<process>'."\n"; 
     
    459459        { 
    460460                //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); 
     461                if (!(isset($this->activity_manager)))  $this->activity_manager = &Factory::newInstance('ActivityManager'); 
     462                if (!(isset($this->role_manager))) $this->role_manager = &Factory::newInstance('RoleManager'); 
    463463                if (!isset($this->jobManager)) 
    464                         $this->jobManager = new JobManager($this->db); 
     464                        $this->jobManager = &Factory::newInstance('JobManager'); 
    465465 
    466466                // First create the process. Always inactive and inactive first. 
     
    620620        function new_process_version($pId, $minor=true) 
    621621        { 
    622                 if (!(isset($this->activity_manager)))  $this->activity_manager = new ActivityManager($this->db); 
     622                if (!(isset($this->activity_manager)))  $this->activity_manager = &Factory::newInstance('ActivityManager'); 
    623623                $oldpid = $pId; 
    624624                //retrieve process info with config rows 
     
    671671                } 
    672672                // create roles 
    673                 if (!(isset($this->role_manager))) $this->role_manager = new RoleManager($this->db); 
     673                if (!(isset($this->role_manager))) $this->role_manager = &Factory::newInstance('RoleManager'); 
    674674                $query = 'select * from '.GALAXIA_TABLE_PREFIX.'roles where wf_p_id=?'; 
    675675                $result = $this->query($query, array($oldpid)); 
     
    853853        function remove_process($pId) 
    854854        { 
    855                 if (!(isset($this->activity_manager)))  $this->activity_manager = new ActivityManager($this->db); 
     855                if (!(isset($this->activity_manager)))  $this->activity_manager = &Factory::newInstance('ActivityManager'); 
    856856                if (!isset($this->jobManager)) 
    857                         $this->jobManager = new JobManager($this->db); 
     857                        $this->jobManager = &Factory::newInstance('JobManager'); 
    858858                $this->deactivate_process($pId); 
    859859                $name = $this->_get_normalized_name($pId); 
     
    919919        function replace_process($pId, &$vars, $create = true) 
    920920        { 
    921                 if (!(isset($this->activity_manager)))  $this->activity_manager = new ActivityManager($this->db); 
     921                if (!(isset($this->activity_manager)))  $this->activity_manager = &Factory::newInstance('ActivityManager'); 
    922922                $TABLE_NAME = GALAXIA_TABLE_PREFIX.'processes'; 
    923923                $now = date("U"); 
     
    12961296                { 
    12971297                        //Warning: this means you have to include the Process.php from the API 
    1298                         $this->Process = new Process($this->db); 
     1298                        $this->Process = &Factory::newInstance('Process'); 
    12991299                        $this->Process->getProcess($pId); 
    13001300                        $result_array = $this->Process->getConfigValues($config_array); 
     
    13161316        { 
    13171317                //Warning: this means you have to include the Process.php from the API 
    1318                 $this->Process = new Process($this->db); 
     1318                $this->Process = &Factory::newInstance('Process'); 
    13191319                $this->Process->getProcess($pId); 
    13201320                $this->Process->setConfigValues($config_array); 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessManager/RoleManager.php

    r2233 r2311  
    1919   * @access public 
    2020   */ 
    21   function RoleManager(&$db)  
    22   { 
    23     parent::Base($db); 
     21  function RoleManager()  
     22  { 
     23    parent::Base(); 
    2424    $this->child_name = 'RoleManager'; 
    2525  } 
  • sandbox/workflow/branches/609/inc/engine/src/ProcessMonitor/ProcessMonitor.php

    r795 r2311  
    1818   * @access public 
    1919   */ 
    20   function ProcessMonitor(&$db) 
     20  function ProcessMonitor() 
    2121  { 
    2222    $this->child_name = 'ProcessMonitor'; 
    23     parent::Base($db); 
     23    parent::Base(); 
    2424    // check the the actual user can really do this 
    2525    if ( !(galaxia_user_can_monitor())) 
  • sandbox/workflow/branches/609/inc/engine/src/common/Base.php

    r2165 r2311  
    3939        var $child_name = 'Base'; 
    4040 
     41        /** 
     42         * @var object $db_shared_obj The database abstraction object shared between 
     43         *                                                    all instances of this class. 
     44         * @acess private 
     45         * @static 
     46         */ 
     47        private static $db_shared_obj = null; 
     48 
    4149  /** 
    4250   * Constructor receiving a database abstraction object 
     
    4654   * @access public 
    4755   */ 
    48   function Base(&$db) 
     56  function Base() 
    4957  { 
    50     if(!$db) { 
     58        /** 
     59         * New Stuff! 
     60         * We decided to get here the database object. In a recent past, 
     61         * all the classes that specialize this one passed a db object. 
     62         * Now, to simplify and save memory, we store the database object 
     63         * into a single and static atribute shared among each instance 
     64         * of this class. 
     65         * 
     66         * To prevent to modify all sub-classes to use "self::$db" instead 
     67         * of "this->db", we made a very tiny workaround here. In the first 
     68         * instantiation of this class, we instantiate the database object 
     69         * and store it into 'self::$db_shared_obj'. Any subsequent 
     70         * instantiations will just point to the static one. 
     71         */ 
     72        if (!self::$db_shared_obj) 
     73                self::$db_shared_obj = &Factory::getInstance('WorkflowObjects')->getDBGalaxia()->Link_ID; 
     74 
     75        $this->db = &self::$db_shared_obj; 
     76 
     77 
     78    if(!$this->db) { 
    5179      die('Invalid db object passed to '.$this->child_name.' constructor'); 
    5280    } 
    5381    //Force transactionnal mysql (Innodb) -> mysqlt 
    54     if ($db->databaseType=='mysql') 
     82    if ($this->db->databaseType=='mysql') 
    5583    { 
    5684        $GLOBALS['phpgw']->db->disconnect(); 
    57         $db = $GLOBALS['phpgw']->db->connect( 
     85        $this->db = $GLOBALS['phpgw']->db->connect( 
    5886                        $GLOBALS['phpgw_info']['server']['db_name'], 
    5987                        $GLOBALS['phpgw_info']['server']['db_host'], 
     
    6492                ); 
    6593    } 
    66     $this->db = &$db; 
    6794  } 
    6895 
  • sandbox/workflow/branches/609/inc/engine/src/common/WfRuntime.php

    r2253 r2311  
    8686   * @access public 
    8787   */ 
    88   function WfRuntime(&$db)  
     88  function WfRuntime()  
    8989  { 
    9090    $this->child_name = 'WfRuntime'; 
    91     parent::Base($db); 
    92     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'BaseActivity.php'); 
    93     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Process.php'); 
    94     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Instance.php'); 
    95     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'common'.SEP.'WfSecurity.php'); 
    96      
     91    parent::Base(); 
     92 
    9793    //first the activity is not set 
    9894    $this->activity = null; 
    99     $this->instance = new Instance($this->db); 
    100     $this->process = new Process($this->db); 
    101     $this->security = new WfSecurity($this->db);  
     95    $this->instance = &Factory::newInstance('Instance'); 
     96    $this->process = &Factory::newInstance('Process'); 
     97    $this->security = &Factory::getInstance('WfSecurity'); 
    10298  } 
    10399 
     
    276272      return false; 
    277273    } 
    278     $base_activity = new BaseActivity($this->db); 
     274    $base_activity = &Factory::getInstance('BaseActivity', $this->db); 
    279275    $this->activity =& $base_activity->getActivity($activity_id, $with_roles, $with_agents); 
    280276    if (!$this->activity) 
  • sandbox/workflow/branches/609/inc/engine/src/common/WfSecurity.php

    r795 r2311  
    2323   * @access public 
    2424   */ 
    25   function WfSecurity(&$db)  
     25  function WfSecurity()  
    2626  { 
    2727    $this->child_name = 'WfSecurity'; 
    28     parent::Base($db); 
    29     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Instance.php'); 
    30     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Process.php'); 
    31     require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'BaseActivity.php'); 
     28    parent::Base(); 
     29 
     30        /* I'm not really sure if we can strip it out. */ 
     31 
     32    //require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Instance.php'); 
     33    //require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'Process.php'); 
     34    //require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'API'.SEP.'BaseActivity.php'); 
    3235  } 
    3336 
     
    5861      ); 
    5962      //check theses values for this process and store the result for this object life duration 
    60       $myProcess = new Process($this->db); 
     63      $myProcess = &Factory::newInstance('Process'); 
    6164      $myProcess->getProcess($pId); 
    6265      $this->processesConfig[$pId] = $myProcess->getConfigValues($arrayConf); 
     
    577580      if (!(isset($this->pm))) 
    578581      { 
    579         require_once(GALAXIA_LIBRARY.SEP.'src'.SEP.'ProcessManager'.SEP.'ProcessManager.php'); 
    580         $this->pm = new ProcessManager($this->db); 
     582        $this->pm = &Factory::newInstance('ProcessManager'); 
    581583      } 
    582584      //$this->error[] = 'DEBUG: checking to see if there is no view activities on process :'.$pId.':'.$this->pm->get_process_view_activity($pId); 
Note: See TracChangeset for help on using the changeset viewer.