Changeset 4740 for trunk/workflow/inc/local/classes/class.wf_instance.php
- Timestamp:
- 07/14/11 14:21:54 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/workflow/inc/local/classes/class.wf_instance.php
r3167 r4740 77 77 { 78 78 $instanceID = (int) $instanceID; 79 $instance = Factory:: getInstance('workflow_instance');79 $instance = Factory::newInstance('workflow_instance'); 80 80 if (!$instance->getInstance($instanceID)) 81 81 return false; … … 243 243 * @return array As instâncias que satisfazem o critério de seleção. 244 244 * @access public 245 * @deprecated 2.2.000 245 246 */ 246 247 public function getAll($activities = null) 247 248 { 249 wf_warn_deprecated_method('wf_instances', 'getAllActive'); 248 250 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; 249 287 } 250 288
Note: See TracChangeset
for help on using the changeset viewer.