Ignore:
Timestamp:
03/15/10 14:41:49 (14 years ago)
Author:
pedroerp
Message:

Ticket #609 - Adaptando os processos do workflow para utilizar o nova factory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/workflow/branches/609/inc/class.run_activity.inc.php

    r2235 r2249  
    1313        require_once(dirname(__FILE__) . SEP . 'class.basecontroller.inc.php' ); /* module controller            */ 
    1414        require_once(dirname(__FILE__) . SEP . 'class.basemodel.inc.php'      ); /* module logic                 */ 
    15         require_once(dirname(__FILE__) . SEP . 'class.process_factory.inc.php'); /* module process factory class */ 
     15        //require_once(dirname(__FILE__) . SEP . 'class.process_factory.inc.php'); /* module process factory class */ 
    1616        require_once(dirname(__FILE__) . SEP . 'class.utils.security.php'     ); /* sanitizes input data         */ 
    1717 
     
    301301                        $this->process_version  = $this->process->getVersion(); 
    302302                        $this->activity_name    = $activity->getName(); 
    303                         $this->user_name        = Factory::getForeignInstance('phpgwapi', 'phpgw')->accounts->id2name($GLOBALS['user']); 
     303                        $this->user_name                = $GLOBALS['phpgw']->accounts->id2name($GLOBALS['user']); 
    304304                        $this->view_activity    = $this->GUI->gui_get_process_view_activity($this->process_id); 
    305305 
     
    440440                        $security             =& new SecurityUtils();              //input sanitizer class 
    441441                        $env['request']       =& $security->process($_REQUEST);    //sanitizes input data from client 
    442                         $env['factory']       =& new ProcessFactory();             //instantiation controller class 
     442                        //$env['factory']       =& new ProcessFactory();             //instantiation controller class 
     443                        $env['factory']       =& Factory::getInstance('ProcessWrapperFactory');  //instantiation controller class 
    443444                        $env['natural']           =& wf_create_object('wf_natural');   //data access object instance for mainframe 
    444445                        /* END WORKFLOW MVC SETTINGS */ 
     
    473474                        /* activate the security policy */ 
    474475                        Factory::getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
     476 
     477                        /** 
     478                         * XXX 
     479                         * here we are going to use our new Security static class. 
     480                         * From now, the factory frontend (static) will forward 
     481                         * the messages for the process factory instead of Workflow 
     482                         * factory. 
     483                         * XXX 
     484                        */ 
     485                        Security::enable(); 
    475486 
    476487                        /* include the files */ 
     
    701712                        $security             =& new SecurityUtils();              //input sanitizer class 
    702713                        $env['request']       =& $security->process($_REQUEST); //sanitizes input data from client 
    703                         $env['factory']       =& new ProcessFactory();                     //instantiation controller class 
     714                        //$env['factory']       =& new ProcessFactory();                           //instantiation controller class 
     715                        $env['factory']       =& Factory::newInstance('ProcessWrapperFactory');  //instantiation controller class 
    704716                        $env['natural']           =& wf_create_object('wf_natural');   //data access object instance for mainframe 
    705717                        /* END WORKFLOW MVC SETTINGS */ 
     
    713725                        /* activate the security policy */ 
    714726                        Factory::getInstance('WorkflowSecurity')->enableSecurityPolicy(); 
     727 
     728                        /** 
     729                         * XXX 
     730                         * here we are going to use our new Security static class. 
     731                         * From now, the factory frontend (static) will forward 
     732                         * the messages for the process factory instead of Workflow 
     733                         * factory. Note that this is the same comment as the previous 
     734                         * function... boooring.. =} 
     735                         * XXX 
     736                        */ 
     737                        Security::enable(); 
    715738 
    716739                        $GLOBALS['workflow_env'] = &$env; 
Note: See TracChangeset for help on using the changeset viewer.