Ignore:
Timestamp:
07/14/11 14:21:54 (13 years ago)
Author:
viani
Message:

Ticket #2119 - Inclusão de parâmetro size no plugin wf_select_user

Location:
trunk/workflow/inc/local/classes
Files:
2 edited

Legend:

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

    r3167 r4740  
    8181 
    8282        /** 
     83        * Busca informações de um (ou mais) processo(s) pelo seu nome (ou apenas parte do nome). 
     84        * @param string $name String contendo o nome de um processo. 
     85        * @return array Informações sobre o(s) processo(s). 
     86        * @access public 
     87        */ 
     88        function getProcessesByName($name) 
     89        { 
     90                $output = array(); 
     91                if (is_string($name)){ 
     92                        $flagObject[0] = is_null($this->processManager); 
     93                        if ($flagObject[0]) 
     94                                $this->processManager = Factory::getInstance('workflow_processmanager'); 
     95 
     96                        // assinatura do método: list_processes($offset,$maxRecords,$sort_mode,$find='',$where='') 
     97                        $output = $this->processManager->list_processes(-1, -1, '', $name, null); 
     98 
     99                        if ($flagObject[0]) 
     100                                $this->processManager = null; 
     101                } 
     102                return $output; 
     103        } 
     104 
     105        /** 
    83106        * Dá seqüência no fluxo de uma instância (simula ação do usuário). 
    84107        * @param int $activityID O ID da atividade da instância. 
  • trunk/workflow/inc/local/classes/class.wf_instance.php

    r3167 r4740  
    7777        { 
    7878                $instanceID = (int) $instanceID; 
    79                 $instance = Factory::getInstance('workflow_instance'); 
     79                $instance = Factory::newInstance('workflow_instance'); 
    8080                if (!$instance->getInstance($instanceID)) 
    8181                        return false; 
     
    243243        * @return array As instâncias que satisfazem o critério de seleção. 
    244244        * @access public 
     245        * @deprecated 2.2.000 
    245246        */ 
    246247        public function getAll($activities = null) 
    247248        { 
     249                wf_warn_deprecated_method('wf_instances', 'getAllActive'); 
    248250                return $this->getIdle(0, $activities); 
     251        } 
     252 
     253        /** 
     254        * Search and return all active instances. 
     255        * @param array $activities A list of activities codes to restrict instances from (may also be a single integer code). 
     256        * @return array The instaces which match the search criteria. 
     257        * @access public 
     258        */ 
     259        public function getAllActive($activities = null) 
     260        { 
     261                return $this->getIdle(0, $activities); 
     262        } 
     263 
     264        /** 
     265        * Retrieve all completed instances. 
     266        * @return array All completed instances from current process. Be careful this may be a long array. 
     267        * @access public 
     268        */ 
     269        public function getAllCompleted() 
     270        { 
     271                $output = array(); 
     272 
     273                // Build the SQL query 
     274                // Select all instances from the process that has a final date 
     275                $query = 'SELECT i.wf_instance_id, i.wf_started, i.wf_ended, i.wf_name, i.wf_status, i.wf_priority '; 
     276                $query .= 'FROM egw_wf_instances i '; 
     277                $query .= 'WHERE (i.wf_p_id = ?) AND (i.wf_ended > 0)'; 
     278                $resultSet = $this->db->query($query, array($this->processID)); 
     279 
     280                /* fetch the results */ 
     281                while ($row = $resultSet->fetchRow()) 
     282                { 
     283                        $output[] = $row; 
     284                } 
     285 
     286                return $output; 
    249287        } 
    250288 
Note: See TracChangeset for help on using the changeset viewer.