Changeset 2858 for sandbox/workflow
- Timestamp:
- 05/26/10 10:12:22 (14 years ago)
- Location:
- sandbox/workflow/trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/workflow/trunk/doc/change_log.txt
r2590 r2858 30 30 #869 - Indentificação do titular e substituro de áreas do organograma. (pedroerp) 31 31 #868 - Correção da altura das janelas de edição do organograma. (pedroerp) 32 #609 - Reconstrução da classe factory (pedroerp/rufino) 32 33 #441 - Inclusão do período de substituição de chefia no organograma. (pedroerp) 33 34 -
sandbox/workflow/trunk/inc/class.run_activity.inc.php
r2466 r2858 24 24 */ 25 25 class run_activity extends WorkflowUtils 26 { 26 { 27 27 /** 28 28 * @var array $public_functions func … … 50 50 * @access public 51 51 */ 52 var $process; 52 var $process; 53 53 /** 54 54 * @var object $GUI GUI engine object. Act carefully with it. … … 62 62 var $message = Array(); 63 63 /** 64 * @var object $categories categorie object for categories 64 * @var object $categories categorie object for categories 65 65 * @access public 66 66 */ 67 67 var $categories; 68 68 /** 69 * @var array $conf 70 * @access public 71 */ 72 var $conf = array(); 69 * @var array $conf 70 * @access public 71 */ 72 var $conf = array(); 73 73 /** 74 74 * @var $wf_template local activity template … … 76 76 */ 77 77 var $wf_template; 78 /** 78 /** 79 79 * @var object $instance 80 80 * @access public 81 81 */ 82 82 var $instance; 83 /** 83 /** 84 84 * @var object $activity_type The type of activity 85 85 * @access public … … 88 88 // then we retain all usefull vars as members, to make them avaible in user's source code 89 89 // theses are data which can be set before the user code and which are not likely to change because of the user code 90 /** 91 * @var int $process_id The process id 90 /** 91 * @var int $process_id The process id 92 92 * @access public 93 93 */ 94 94 var $process_id; 95 /** 96 * @var int $activity_id The activity id 95 /** 96 * @var int $activity_id The activity id 97 97 * @access public 98 98 */ 99 99 var $activity_id; 100 /** 100 /** 101 101 * @var int $process_name The process name 102 102 * @access public 103 103 */ 104 104 var $process_name; 105 /** 106 * @var int $process_version The process_version 105 /** 106 * @var int $process_version The process_version 107 107 * @access public 108 108 */ 109 109 var $process_version; 110 /** 111 * @var int $activity_name The process id 110 /** 111 * @var int $activity_name The process id 112 112 * @access public 113 113 */ 114 114 var $activity_name; 115 /** 116 * @var int $user_name The user name 115 /** 116 * @var int $user_name The user name 117 117 * @access public 118 118 */ 119 119 var $user_name; 120 /** 121 * @var int $view_activity activity id of the view activity avaible for this process 120 /** 121 * @var int $view_activity activity id of the view activity avaible for this process 122 122 * @access public 123 123 */ 124 124 var $view_activity; 125 // theses 4 vars aren't avaible for the user code, they're set only after this user code was executed 126 /** 127 * @var int $instance_id Instance id 125 // theses 4 vars aren't avaible for the user code, they're set only after this user code was executed 126 /** 127 * @var int $instance_id Instance id 128 128 * @access public 129 129 */ 130 130 var $instance_id=0; 131 /** 132 * @var string $instance_name Instance name 131 /** 132 * @var string $instance_name Instance name 133 133 * @access public 134 134 */ 135 135 var $instance_name=''; 136 /** 137 * @var int $instance_owner Instance owner id 136 /** 137 * @var int $instance_owner Instance owner id 138 138 * @access public 139 139 */ 140 140 var $instance_owner=0; 141 /** 142 * @var string $owner_name Owner name 141 /** 142 * @var string $owner_name Owner name 143 143 * @access public 144 144 */ 145 145 var $owner_name=''; 146 146 147 147 /** 148 148 * @var bool $print_mode print mode … … 155 155 */ 156 156 var $enable_print_mode = false; 157 157 158 158 /** 159 159 * @var array $act_role_names of roles associated with the activity, usefull for lists of users associated with theses roles 160 * @access public 160 * @access public 161 161 */ 162 162 var $act_role_names= Array(); 163 163 164 164 /** 165 165 * @var array $agents Array of ui_agent objects … … 172 172 * @access public 173 173 */ 174 var $smarty; 174 var $smarty; 175 175 /** 176 176 * @var array $wf holds a global environment vector 177 177 * @access public 178 178 */ 179 var $wf; 179 var $wf; 180 180 /** 181 181 * @var $download_mode activates download mode 182 182 * @access public 183 183 */ 184 var $download_mode; 184 var $download_mode; 185 185 /** 186 186 * @var string $_template_name holds the template's file name 187 187 * @access public 188 188 */ 189 var $_template_name = null; 189 var $_template_name = null; 190 190 /** 191 191 * @var bool Indicates wether the current instance is a child instance or not … … 193 193 */ 194 194 var $isChildInstance = false; 195 195 196 /** 196 197 * @var object Stores a 'workflow_smarty' object … … 200 201 201 202 /** 203 * @var object Log Object 204 * @access private 205 */ 206 private $logger = null; 207 208 /** 202 209 * Constructor 203 * 204 * @access public 210 * 211 * @access public 205 212 */ 206 213 function run_activity() … … 218 225 219 226 $this->workflowSmarty = &Factory::getInstance('workflow_smarty', false); 227 228 // never configure a log of type "firebug" here. This will make goAjax stop running well =( 229 $this->logger = &Factory::getInstance('Logger', array('file')); 220 230 221 231 // TODO: open a new connection to the database under a different username to allow privilege handling on tables … … 236 246 function go($activity_id=0, $iid=0, $auto=0) 237 247 { 248 $totalTime = microtime(true); 249 238 250 $result=Array(); 239 251 … … 431 443 432 444 /* BEGIN WORKFLOW MVC SETTINGS */ 433 $env = array( );//create settings vector445 $env = array(); //create settings vector 434 446 $env['view'] =& $smarty; //view layer instance 435 447 $env['template_file'] =& $_template_name; //template file to be shown 436 $env['dao'] =& wf_create_object('wf_db');//data access object instance448 $env['dao'] =& Factory::newInstance('wf_db'); //data access object instance 437 449 $env['workflow'] =& $GLOBALS['workflow']; //workflow environment information 438 450 $env['instance'] =& $instance; //process manager instance … … 441 453 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 442 454 $env['factory'] =& Factory::getInstance('ProcessWrapperFactory'); //instantiation controller class 443 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe455 $env['natural'] =& Factory::newInstance('wf_natural'); //data access object instance for mainframe 444 456 /* END WORKFLOW MVC SETTINGS */ 445 457 … … 485 497 486 498 /* include the files */ 499 $processTime = microtime(true); 500 487 501 foreach ($_engineFiles as $_engineFile) 488 502 require $_engineFile; 503 504 $processTime = (microtime(true) - $processTime); 489 505 490 506 unset($GLOBALS['workflow_env']); … … 528 544 } 529 545 546 $totalTime = (microtime(true) - $totalTime); 547 548 $logTime = sprintf("GO [pid=%s,iid=%s,uid=%s,aid=%s] [eng=%ss,proc=%ss]", 549 $this->process_id, 550 $this->instance_id, 551 $GLOBALS['user'], 552 $this->activity_id, 553 number_format(($totalTime - $processTime),3), 554 number_format($processTime,3) ); 555 556 $this->logger->debug($logTime); 557 530 558 // TODO: process instance comments 531 532 559 $instructions = $this->runtime->handle_postUserCode(_DEBUG); 533 560 switch($instructions['action']) … … 593 620 function goAjax($activity_id=0, $iid=0, $auto=0) 594 621 { 622 $totalTime = microtime(true); 623 595 624 $result=Array(); 596 625 … … 702 731 703 732 /* BEGIN WORKFLOW MVC SETTINGS */ 704 $env = array( );//create settings vector705 $env['dao'] =& wf_create_object('wf_db');//data access object instance733 $env = array(); //create settings vector 734 $env['dao'] =& Factory::newInstance('wf_db'); //data access object instance 706 735 $env['workflow'] =& $GLOBALS['workflow']; //workflow environment information 707 736 $env['instance'] =& $instance; //process manager instance … … 710 739 $env['request'] =& $security->process($_REQUEST); //sanitizes input data from client 711 740 $env['factory'] =& Factory::newInstance('ProcessWrapperFactory'); //instantiation controller class 712 $env['natural'] =& wf_create_object('wf_natural'); //data access object instance for mainframe741 $env['natural'] =& Factory::newInstance('wf_natural'); //data access object instance for mainframe 713 742 /* END WORKFLOW MVC SETTINGS */ 714 743 … … 727 756 * the messages for the process factory instead of Workflow 728 757 * factory. Note that this is the same comment as the previous 729 * function... boooring.. =}758 * function... boooring.. 730 759 */ 731 760 Security::enable(); … … 734 763 $nc = &Factory::newInstance('NanoController'); 735 764 $nc->setClassPath(GALAXIA_PROCESSES . SEP . $this->process->getNormalizedName(). SEP . 'code'); 765 766 $processTime = microtime(true); 736 767 $nc->iterateOverVirtualRequests(); 768 $processTime = microtime(true) - $processTime; 769 737 770 $nc->outputResultData(); 738 771 unset($GLOBALS['workflow_env']); … … 740 773 if (!is_null($iid)) 741 774 $instance->instance->sync(); 775 776 $totalTime = microtime(true) - $totalTime; 777 778 $logTime = sprintf("GOAJAX [pid=%s,iid=%s,uid=%s,aid=%s] [eng=%ss,proc=%ss]", 779 $this->process_id, 780 $this->instance_id, 781 $GLOBALS['user'], 782 $this->activity_id, 783 number_format(($totalTime - $processTime),3), 784 number_format($processTime,3) ); 785 786 $this->logger->debug($logTime); 742 787 } 743 788 -
sandbox/workflow/trunk/inc/class.so_userinterface.inc.php
r2466 r2858 333 333 { 334 334 $employees[$i]['telephoneNumber'] = is_null($entry['telephonenumber']) ? '' : $entry['telephonenumber']; 335 $employees[$i]['cn'] = is_null($entry['cn']) ? '' : $entry['cn'] . (is_null($entry['last_update']) ? ' <font color="red">( excluído)</font>' : '');335 $employees[$i]['cn'] = is_null($entry['cn']) ? '' : $entry['cn'] . (is_null($entry['last_update']) ? ' <font color="red">(inativo)</font>' : ''); 336 336 } 337 337 } -
sandbox/workflow/trunk/inc/class.ui_adminroles.inc.php
r2372 r2858 278 278 $glabel = ""; 279 279 if (is_null($entry['last_update'])) 280 $glabel = '<font color="red">( excluído)</font>';280 $glabel = '<font color="red">(inativo)</font>'; 281 281 } 282 282 -
sandbox/workflow/trunk/inc/engine/src/common/WfRuntime.php
r2372 r2858 6 6 * as it handle concurrency and part of the core execution of the instance while avoiding 7 7 * bad manipulation of the instance 8 * 8 * 9 9 * @package Galaxia 10 * @license http://www.gnu.org/copyleft/gpl.html GPL 10 * @license http://www.gnu.org/copyleft/gpl.html GPL 11 11 */ 12 class WfRuntime extends Base 13 { 12 class WfRuntime extends Base 13 { 14 14 /** 15 15 * @var array processes config values cached for this object life duration, init is done at first use for the only process associated with this runtime object 16 16 * @access public 17 17 */ 18 var $conf= Array(); 18 var $conf= Array(); 19 19 /** 20 20 * @var object $activity 21 * @access public 21 * @access public 22 22 */ 23 23 var $activity = null; 24 24 /** 25 25 * @var object $instance 26 * @access public 26 * @access public 27 27 */ 28 28 var $instance = null; 29 29 /** 30 30 * @var int $instance_id 31 * @access public 32 */ 33 var $instance_id = 0; 31 * @access public 32 */ 33 var $instance_id = 0; 34 34 /** 35 35 * @var int $activity_id 36 * @access public 36 * @access public 37 37 */ 38 38 var $activity_id = 0; 39 39 /** 40 40 * @var object $process Retrieve process information 41 * @access public 41 * @access public 42 42 */ 43 43 var $process = null; 44 44 /** 45 45 * @var object $workitems Reference to $instance->workitems 46 * @access public 46 * @access public 47 47 */ 48 48 var $workitems = null; 49 49 /** 50 50 * @var object $activities Reference to $instance->activities 51 * @access public 52 */ 51 * @access public 52 */ 53 53 var $activities = null; 54 54 /** 55 55 * @var object $security Security object 56 * @access public 57 */ 56 * @access public 57 */ 58 58 var $security = null; 59 59 /** 60 60 * @var bool $transaction_in_progress Transaction state 61 * @access public 62 */ 63 var $transaction_in_progress = false; 61 * @access public 62 */ 63 var $transaction_in_progress = false; 64 64 /** 65 65 * @var bool $debug Debug state 66 * @access public 67 */ 66 * @access public 67 */ 68 68 var $debug=false; 69 69 /** 70 70 * @var bool $auto_mode Automatic mode state, non-interactive for instance, big impact on error handling 71 * @access public 72 */ 71 * @access public 72 */ 73 73 var $auto_mode=false; 74 74 … … 81 81 /** 82 82 * Constructor 83 * 83 * 84 84 * @param object &$db ADOdb 85 85 * @return object WfRuntime instance 86 86 * @access public 87 87 */ 88 function WfRuntime() 88 function WfRuntime() 89 89 { 90 90 $this->child_name = 'WfRuntime'; … … 101 101 * Collect errors from all linked objects which could have been used by this object 102 102 * Each child class should instantiate this function with her linked objetcs, calling get_error(true) 103 * 103 * 104 104 * @param bool $debug false by default, if true debug messages can be added to 'normal' messages 105 105 * @param string $prefix appended to the debug message 106 * @return void 106 * @return void 107 107 * @access private 108 108 */ … … 118 118 /** 119 119 * Ends-up dying and giving a last message 120 * 120 * 121 121 * @param string $last_message last sentence 122 122 * @param bool $include_errors false by default, if true we'll include error messages … … 134 134 if ($this->debug) $debug = true; 135 135 if ($this->auto_mode) $dying = false; 136 136 137 137 if ($include_errors) 138 138 { … … 161 161 * Loads the config values for the process associated with the runtime 162 162 * config values are cached while this WfRuntime object stays alive 163 * 163 * 164 164 * @param array $arrayconf Config array with default value, where key is config option name and value is default value 165 * @access private 165 * @access private 166 166 * @return array Values associated with the current process for the asked config options and as well for som WfRuntime internal config options 167 167 */ … … 172 172 $this->loadProcess(); 173 173 } 174 $arrayconf['auto-release_on_leaving_activity'] = 1; 174 $arrayconf['auto-release_on_leaving_activity'] = 1; 175 175 $this->conf = $this->process->getConfigValues($arrayconf); 176 176 return $this->conf; … … 179 179 /** 180 180 * Loads instance, the activity and the process, needed by the runtime engine to 'execute' the activity 181 * 181 * 182 182 * @param int $activityId activity id, the activity we will run 183 183 * @param int $instanceId instance Id, can be empty for a start or standalone activity 184 * @return bool 184 * @return bool 185 185 * @access public 186 186 */ … … 204 204 return false; 205 205 } 206 206 207 207 //ensure the activity is not completed 208 208 $this->instance->setActivityCompleted(false); 209 209 $this->instance->activityID = $activityId; 210 210 211 211 //set the workitems and activities links 212 212 $this->workitems =& $this->instance->workitems; … … 214 214 return true; 215 215 } 216 216 217 217 /** 218 218 * Retrieves the process object associated with the activity 219 * 219 * 220 220 * @param int $pId Process id of the process you want, if you do not give it we will try to take it from the activity 221 221 * @return mixed Process object of the right type or false … … 242 242 return true; 243 243 } 244 244 245 245 /** 246 246 * Gets current process instance 247 * 247 * 248 248 * @return object Process instance 249 249 * @access public … … 256 256 /** 257 257 * Retrieves the activity of the right type from a baseActivity Object 258 * 258 * 259 259 * @param int $activity_id activity_id you want 260 260 * @param bool $with_roles will load the roles links on the object … … 285 285 return true; 286 286 } 287 287 288 288 /** 289 289 * Gets current activity instance 290 * 290 * 291 291 * @return object Activity instance 292 292 * @access public 293 */ 293 */ 294 294 function &getActivity() 295 295 { 296 296 return $this->activity; 297 297 } 298 298 299 299 /** 300 300 * Gets the instance which could be an empty object 301 * 301 * 302 302 * @param int $instanceId is the instance id 303 303 * @return mixed Instance object which can be empty or string if something was turning bad … … 308 308 $this->instance_id = $instanceId; 309 309 $this->instance->getInstance($instanceId); 310 if ( ($this->instance->getInstanceId()==0) 310 if ( ($this->instance->getInstanceId()==0) 311 311 && (! (($this->activity->getType()=='standalone') || ($this->activity->getType()=='start') )) ) 312 312 { … … 319 319 return true; 320 320 } 321 321 322 322 /** 323 323 * Perform necessary security checks at runtime before running an activity 324 324 * This will as well lock the tables via the security object 325 325 * It should be launched in a transaction 326 * 326 * 327 327 * @return bool true if ok, false if the user has no runtime access 328 328 * @access public … … 356 356 * This will as well lock the tables via the security object 357 357 * It should be launched in a transaction 358 * 358 * 359 359 * @return bool true if ok, false if the user has no runtime access instance and activity are unsetted in case of false check 360 360 * @access public … … 372 372 //we are granted an access to release but there is a special bad case where 373 373 //we are a user authorized at releasing instances owned by others and where 374 //this instance is owned by another (for some quite complex reasons). 374 //this instance is owned by another (for some quite complex reasons). 375 375 //we should not release this new user!! 376 //Then this is auto-release, not a conscious act and so we will release only 376 //Then this is auto-release, not a conscious act and so we will release only 377 377 //if we can still grab this instance (avoiding the bad case) 378 378 379 379 //test grab before release 380 380 if ($this->checkUserRun()) … … 386 386 return false; 387 387 } 388 388 389 389 /** 390 390 * Sets/unsets the WfRuntime in debug mode 391 * 391 * 392 392 * @param bool $debug_mode true by default, set it to false to disable debug mode 393 393 * @access public 394 * @return void 394 * @return void 395 395 */ 396 396 function setDebug($debug_mode=true) … … 398 398 $this->debug = $debug_mode; 399 399 } 400 400 401 401 /** 402 402 * Sets/unsets the WfRuntime in automatic mode. i.e : executing 403 403 * non-interactive or interactive activities. Automatic mode have big impacts 404 404 * on error handling and on the way activities are executed 405 * 405 * 406 406 * @param bool $auto_mode true by default, set it to false to disable automatic mode 407 407 * @access public 408 * @return void 408 * @return void 409 409 */ 410 410 function setAuto($auto_mode=true) … … 412 412 $this->auto_mode = $auto_mode; 413 413 } 414 414 415 415 /** 416 416 * This function will start a transaction, call it before setActivityUser() 417 * 418 * @access public 419 * @return void 417 * 418 * @access public 419 * @return void 420 420 */ 421 421 function StartRun() … … 424 424 $this->db->StartTrans(); 425 425 } 426 426 427 427 /** 428 428 * This function ends the transactions started in StartRun() 429 * 429 * 430 430 * @access public 431 431 * @return void … … 433 433 function EndStartRun() 434 434 { 435 if ($this->transaction_in_progress) 435 if ($this->transaction_in_progress) 436 436 { 437 437 $this->db->CompleteTrans(); … … 439 439 } 440 440 } 441 442 /** 443 * For interactive activities this function will set the current user on the instance-activities table. 441 442 /** 443 * For interactive activities this function will set the current user on the instance-activities table. 444 444 * This will prevent having several user using the same activity on the same intsance at the same time 445 445 * But if you want this function to behave well you should call it after a checkUserRun or a checkUserRelease 446 446 * and inside a transaction. Theses others function will ensure the table will be locked and the user 447 447 * is really granted the action 448 * 448 * 449 449 * @param bool $grab true by default, if false the user will be set to '*', releasing the instance-activity record 450 450 * @access public 451 * @return bool 451 * @return bool 452 452 */ 453 453 function setActivityUser($grab=true) 454 454 { 455 if(isset($GLOBALS['user']) && !empty($this->instance->instanceId) && !empty($this->activity_id)) 455 if(isset($GLOBALS['user']) && !empty($this->instance->instanceId) && !empty($this->activity_id)) 456 456 { 457 457 if ($this->activity->isInteractive()) … … 480 480 $this->error[] = $errors; 481 481 return false; 482 } 483 } 484 482 } 483 } 484 485 485 /** 486 486 * Tries to give some usefull info about the current runtime 487 * 487 * 488 488 * @return array associative arrays with keys/values which could be usefull 489 489 * @access public … … 510 510 * This part of the runtime will be runned just after the activity code inclusion. 511 511 * We are in fact after all the "user code" part. We should decide what to do next 512 * 512 * 513 513 * @param bool $debug false by default 514 514 * @return array an array which must be analysed by the application run class. It contains 2 keys … … 525 525 { 526 526 $result = Array(); 527 527 528 528 // re-retrieve instance id which could have been modified by a complete 529 529 $this->instance_id = $this->instance->getInstanceId(); 530 530 531 531 //synchronised instance object with the database 532 532 $this->instance->sync(); … … 537 537 if ($this->instance->getActivityCompleted()) 538 538 { 539 // activity is interactive and completed, 539 // activity is interactive and completed, 540 540 // we have to continue the workflow 541 541 // and send any autorouted activity which could be after this one … … 554 554 if ($GLOBALS['workflow']['__leave_activity']) 555 555 { 556 // activity is interactive and the activity source set the 556 // activity is interactive and the activity source set the 557 557 // $GLOBALS[workflow][__leave_activity] it's a 'cancel' mode. 558 558 // we redirect the user to the leave activity page … … 561 561 } 562 562 else 563 { 563 { 564 564 //the activity is not completed and the user doesn't want to leave 565 565 // we loop on the form … … 570 570 } 571 571 else 572 { 572 { 573 573 // in auto mode or with non interactive activities we return engine info 574 574 // and we collect our errors, we do not let them for other objects … … 583 583 /** 584 584 * Gets the the 'Activity Completed' status 585 * 586 * @access public 587 * @return string 585 * 586 * @access public 587 * @return string 588 588 */ 589 589 function getActivityCompleted() … … 592 592 } 593 593 594 594 595 595 //----------- Instance public function mapping ------------------------------------------- 596 596 597 597 /** 598 598 * Sets the next activity to be executed, if the current activity is 599 599 * a switch activity the complete() method will use the activity setted 600 * in this method as the next activity for the instance. 600 * in this method as the next activity for the instance. 601 601 * Note that this method receives an activity name as argument (Not an Id) 602 602 * and that it does not need the activityId like the instance method 603 * 603 * 604 604 * @param string $actname name of the next activity 605 605 * @return bool 606 606 * @access public 607 607 */ 608 function setNextActivity($actname) 608 function setNextActivity($actname) 609 609 { 610 610 return $this->instance->setNextActivity($this->activity_id,$actname); … … 612 612 613 613 /** 614 * Sets the user that must perform the next 614 * Sets the user that must perform the next 615 615 * activity of the process. this effectively "assigns" the instance to 616 616 * some user 617 * 617 * 618 618 * @param int $user the next user id 619 619 * @param string $activityName The name of the activity that the user will be able to executed. '*' means the next activity. 620 * @return bool 620 * @return bool 621 621 * @access public 622 622 */ … … 631 631 632 632 /** 633 * Sets the user role that must perform the next 633 * Sets the user role that must perform the next 634 634 * activity of the process. this effectively "assigns" the instance to 635 635 * some user 636 * 636 * 637 637 * @param string $roleName the next activity role 638 638 * @param string $activityName The name of the activity that the role will be able to executed. '*' means the next activity. … … 655 655 656 656 /** 657 * Gets the user that must perform the next activity of the process. 657 * Gets the user that must perform the next activity of the process. 658 658 * This can be empty if no setNextUser() was done before. 659 659 * It wont return the default user but only the user which was assigned by a setNextUser 660 * 661 * @return int 662 * @access public 663 */ 664 function getNextUser() 660 * 661 * @return int 662 * @access public 663 */ 664 function getNextUser() 665 665 { 666 666 return $this->instance->getNextUser(); 667 667 } 668 668 669 669 /** 670 670 * Sets the name of this instance. 671 * 671 * 672 672 * @param string $value new name of the instance 673 * @return bool 674 * @access public 675 */ 676 function setName($value) 673 * @return bool 674 * @access public 675 */ 676 function setName($value) 677 677 { 678 678 return $this->instance->setName($value); … … 681 681 /** 682 682 * Gets the name of this instance 683 * 684 * @return string 683 * 684 * @return string 685 685 * @access public 686 686 */ … … 691 691 /** 692 692 * Sets the category of this instance 693 * 693 * 694 694 * @param string $value 695 695 * @return bool 696 696 * @access public 697 697 */ 698 function setCategory($value) 698 function setCategory($value) 699 699 { 700 700 return $this->instance->setcategory($value); … … 703 703 /** 704 704 * Gets category of this instance 705 * 706 * @return string 707 * @access public 708 */ 709 function getCategory() 705 * 706 * @return string 707 * @access public 708 */ 709 function getCategory() 710 710 { 711 711 return $this->instance->getCategory(); 712 712 } 713 713 714 714 /** 715 715 * Sets a property in this instance. This method is used in activities to … … 718 718 * problems (A->z, digits and _ for spaces). If you have several set to call look 719 719 * at the setProperties function. Each call to this function has an impact on database 720 * 720 * 721 721 * @param string $name property name (it will be normalized) 722 722 * @param mixed $value value for this property 723 * @return bool 724 * @access public 725 */ 726 function set($name,$value) 723 * @return bool 724 * @access public 725 */ 726 function set($name,$value) 727 727 { 728 728 return $this->instance->set($name,$value); 729 729 } 730 730 731 731 /** 732 732 * Unsets a property in this instance. This method is used in activities to … … 734 734 * All property names are normalized for security reasons and to avoid localisation 735 735 * problems (A->z, digits and _ for spaces). Each call to this function has an impact on database 736 * 736 * 737 737 * @param string $name property name (it will be normalized) 738 738 * @return bool true if it was ok 739 739 * @access public 740 740 */ 741 function clear($name) 741 function clear($name) 742 742 { 743 743 return $this->instance->clear($name); … … 749 749 * All property names are normalized for security reasons and to avoid localisation 750 750 * problems (A->z, digits and _ for spaces) 751 * 751 * 752 752 * @param string $name property name (it will be normalized) 753 753 * @return bool true if it exists and false otherwise … … 766 766 * problems (A->z, digits and _ for spaces). If you have several set to call look 767 767 * at the setProperties function. Each call to this function has an impact on database 768 * 768 * 769 769 * @param array $properties_array associative array containing for each record the 770 770 * property name as the key and the property value as the value. You do not need the complete … … 780 780 /** 781 781 * Gets the value of an instance property 782 * 782 * 783 783 * @param string $name name of the instance 784 784 * @param string $defaultValue … … 793 793 /** 794 794 * Describes the activities where the instance is present, can be more than one activity if the instance was "splitted" 795 * 795 * 796 796 * @access public 797 797 * @return array Vector of assocs 798 798 */ 799 function getActivities() 799 function getActivities() 800 800 { 801 801 return $this->instance->getActivities(); 802 802 } 803 803 804 804 /** 805 805 * Gets the instance status can be 'completed', 'active', 'aborted' or 'exception' 806 * 806 * 807 807 * @access public 808 808 * @return string Instance status 809 809 */ 810 function getStatus() 810 function getStatus() 811 811 { 812 812 return $this->instance->getStatus(); 813 813 } 814 814 815 815 /** 816 816 * Sets the instance status 817 * 817 * 818 818 * @param $status Desired status, it can be: 'completed', 'active', 'aborted' or 'exception' 819 819 * @return bool 820 820 * @access public 821 821 */ 822 function setStatus($status) 822 function setStatus($status) 823 823 { 824 824 return $this->instance->setStatus($status); 825 825 } 826 826 827 827 /** 828 828 * Gets the instance priority 829 * 830 * @access public 831 * @return int 829 * 830 * @access public 831 * @return int 832 832 */ 833 833 function getPriority() 834 834 { 835 835 return $this->instance->getPriority(); 836 } 836 } 837 837 838 838 /** 839 839 * Sets the instance priority 840 * 840 * 841 841 * @param int $priority 842 842 * @access public 843 * @return bool 843 * @return bool 844 844 */ 845 845 function setPriority($priority) … … 847 847 return $this->instance->setPriority($priority); 848 848 } 849 849 850 850 /** 851 851 * Returns the instance id 852 * 853 * @return int 854 * @access public 855 */ 856 function getInstanceId() 852 * 853 * @return int 854 * @access public 855 */ 856 function getInstanceId() 857 857 { 858 858 return $this->instance->getInstanceId(); 859 859 } 860 860 861 861 /** 862 862 * Returns the process id for this instance 863 * 864 * @return int 865 * @access public 863 * 864 * @return int 865 * @access public 866 866 */ 867 867 function getProcessId() { 868 868 return $this->instance->getProcessId(); 869 869 } 870 870 871 871 /** 872 872 * Returns the owner of the instance 873 * 874 * @return string 875 * @access public 876 */ 877 function getOwner() 873 * 874 * @return string 875 * @access public 876 */ 877 function getOwner() 878 878 { 879 879 return $this->instance->getOwner(); 880 880 } 881 881 882 882 /** 883 883 * Sets the instance owner 884 * 885 * @param string $user 886 * @access public 887 * @return bool 888 */ 889 function setOwner($user) 884 * 885 * @param string $user 886 * @access public 887 * @return bool 888 */ 889 function setOwner($user) 890 890 { 891 891 return $this->instance->setOwner($user); 892 892 } 893 893 894 894 /** 895 895 * Returns the user that must execute or is already executing an activity where the instance is present 896 * 896 * 897 897 * @param int $activityId 898 898 * @return bool False if the activity was not found for the instance, else return the user id or '*' if no user is defined yet 899 899 * @access public 900 */ 901 function getActivityUser($activityId) 900 */ 901 function getActivityUser($activityId) 902 902 { 903 903 return $this->instance->getActivityUser($activityId); 904 904 } 905 905 906 906 /** 907 907 * Sets the status of the instance in some activity 908 * 908 * 909 909 * @param int $activityId Activity id 910 910 * @param string $status New status, it can be 'running' or 'completed' 911 911 * @return bool False if no activity was found for the instance 912 912 * @access public 913 */ 914 function setActivityStatus($activityId,$status) 913 */ 914 function setActivityStatus($activityId,$status) 915 915 { 916 916 return $this->instance->setActivityStatus($activityId,$status); 917 917 } 918 919 920 /** 921 * Gets the status of the instance in some activity 922 * 923 * @param int $activityId 918 919 920 /** 921 * Gets the status of the instance in some activity 922 * 923 * @param int $activityId 924 924 * @return string 'running' or 'completed' 925 925 * @access public 926 926 */ 927 function getActivityStatus($activityId) 927 function getActivityStatus($activityId) 928 928 { 929 929 return $this->instance->getActivityStatus($activityId); 930 930 } 931 931 932 932 /** 933 933 * Resets the start time of the activity indicated to the current time 934 * 934 * 935 935 * @param int $activityId 936 * @return bool 937 * @access public 938 */ 939 function setActivityStarted($activityId) 936 * @return bool 937 * @access public 938 */ 939 function setActivityStarted($activityId) 940 940 { 941 941 return $this->instance->setActivityStarted($activityId); 942 942 } 943 943 944 944 /** 945 945 * Gets the Unix timstamp of the starting time for the given activity 946 * 946 * 947 947 * @param int $activityId 948 * @return int 949 * @access public 950 */ 951 function getActivityStarted($activityId) 948 * @return int 949 * @access public 950 */ 951 function getActivityStarted($activityId) 952 952 { 953 953 return $this->instance->getActivityStarted($activityId); 954 954 } 955 955 956 956 /** 957 957 * Gets the time where the instance was started 958 * 959 * @return int 960 * @access public 961 */ 962 function getStarted() 958 * 959 * @return int 960 * @access public 961 */ 962 function getStarted() 963 963 { 964 964 return $this->instance->getStarted(); 965 965 } 966 966 967 967 /** 968 968 * Gets the end time of the instance (when the process was completed) 969 * 970 * @return int 971 * @access public 972 */ 973 function getEnded() 969 * 970 * @return int 971 * @access public 972 */ 973 function getEnded() 974 974 { 975 975 return $this->instance->getEnded(); 976 976 } 977 978 977 978 979 979 /** 980 980 * Completes an activity. … … 982 982 * the engine does automatically complete automatic activities after 983 983 * executing them 984 * 984 * 985 985 * @return bool True or false, if false it means the complete was not done for some internal reason 986 986 * consult get_error() for more informations 987 987 * @access public 988 988 */ 989 function complete() 989 function complete() 990 990 { 991 991 if (!($this->activity->isInteractive())) … … 994 994 return false; 995 995 } 996 996 997 997 return $this->instance->complete($this->activity_id); 998 998 } … … 1001 1001 * Aborts an activity and terminates the whole instance. We still create a workitem to keep track 1002 1002 * of where in the process the instance was aborted 1003 * 1004 * @return bool 1005 * @access public 1006 */ 1007 function abort() 1003 * 1004 * @return bool 1005 * @access public 1006 */ 1007 function abort() 1008 1008 { 1009 1009 return $this->instance->abort(); 1010 1010 } 1011 1011 1012 1012 /** 1013 1013 * Gets a comment for this instance 1014 * 1014 * 1015 1015 * @param int $cId Comment id 1016 * @return string 1017 * @access public 1018 */ 1019 function get_instance_comment($cId) 1016 * @return string 1017 * @access public 1018 */ 1019 function get_instance_comment($cId) 1020 1020 { 1021 1021 return $this->instance->get_instance_comment($cId); 1022 1022 } 1023 1023 1024 1024 /** 1025 1025 * Inserts or updates an instance comment 1026 * 1026 * 1027 1027 * @param int $cId Commend id 1028 * @param int $activityId 1029 * @param object $activity 1028 * @param int $activityId 1029 * @param object $activity 1030 1030 * @param int $user User id 1031 1031 * @param string $title Comment's title 1032 1032 * @param string $comment Comment's contents 1033 * @return bool 1034 * @access public 1035 */ 1036 function replace_instance_comment($cId, $activityId, $activity, $user, $title, $comment) 1033 * @return bool 1034 * @access public 1035 */ 1036 function replace_instance_comment($cId, $activityId, $activity, $user, $title, $comment) 1037 1037 { 1038 1038 return $this->instance->replace_instance_comment($cId, $activityId, $activity, $user, $title, $comment); 1039 1039 } 1040 1040 1041 1041 /** 1042 1042 * Removes an instance comment 1043 * 1043 * 1044 1044 * @param int $cId Comment id 1045 * @return bool 1046 * @access public 1047 */ 1048 function remove_instance_comment($cId) 1045 * @return bool 1046 * @access public 1047 */ 1048 function remove_instance_comment($cId) 1049 1049 { 1050 1050 return $this->instance->remove_instance_comment($cId); 1051 1051 } 1052 1052 1053 1053 /** 1054 1054 * Lists instance comments 1055 * 1056 * @return array 1057 * @access public 1058 */ 1059 function get_instance_comments() 1055 * 1056 * @return array 1057 * @access public 1058 */ 1059 function get_instance_comments() 1060 1060 { 1061 1061 return $this->instance->get_instance_comments(); … … 1087 1087 $workflow = $GLOBALS['workflow']; 1088 1088 unset($_REQUEST['iid']); 1089 $run_activity = Factory:: getInstance('run_activity');1089 $run_activity = Factory::newInstance('run_activity'); 1090 1090 $run_activity->runtime->instance->parentInstanceId = $this->instance_id; 1091 1091 $run_activity->runtime->instance->parentActivityId = $this->activity_id; -
sandbox/workflow/trunk/inc/local/classes/class.wf_engine.php
r2466 r2858 192 192 { 193 193 $WFInstance = &Factory::getInstance('wf_instance'); 194 $preOutput = $WFInstance->getChildren($instanceID , $activityID);194 $preOutput = $WFInstance->getChildren($instanceID); 195 195 $output = array(); 196 196 foreach ($preOutput as $childInstance) -
sandbox/workflow/trunk/inc/local/classes/class.wf_instance.php
r2466 r2858 250 250 251 251 /** 252 * Busca as instâncias filhas de uma instância 253 * Se os parâmetros não forem informados, retorna instâncias filhas das instância atual. 254 * @param int $instanceID O ID da instância pai (não obrigatório). 255 * @param int $activityID O ID da atividade corrente da instância pai 256 * @return array As instâncias filhas do par instância/atividade atual 257 * @access public 258 */ 259 public function getChildren($instanceID = null, $activityID = null) 252 * This method gets all children instances of the given instance. 253 * If there is no parameter, it gets the children instances of the current instance 254 * @param int $instanceID Dad instance's identification. 255 * @return array Array with the children instances, or false 256 * @access public 257 */ 258 public function getChildren($instanceID = null) 260 259 { 261 260 $output = array(); 262 261 if (is_null($instanceID)) 263 262 $instanceID = $GLOBALS['workflow']['wf_runtime']->instance_id; 264 if (is_null($activityID)) 265 $activityID = $GLOBALS['workflow']['wf_runtime']->activity_id; 266 267 /* check instanceID */ 268 if (!$this->checkInstanceAccess($instanceID, $activityID)) 263 264 /* check instanceID */ 265 if (!$this->checkInstanceAccess($instanceID)) 269 266 return $output; 270 267 271 268 /* build the SQL query */ 272 $query = 'SELECT i.wf_instance_id AS wf_instance_id, ia.wf_activity_id AS wf_activity_id, ia.wf_started AS wf_started, i.wf_name AS wf_name, i.wf_status AS wf_status, ia.wf_user AS wf_user, ir.wf_parent_lock AS wf_parent_lock '; 273 $query .= 'FROM egw_wf_interinstance_relations ir, egw_wf_instances i LEFT JOIN egw_wf_instance_activities ia ON (ia.wf_instance_id = i.wf_instance_id)'; 274 $query .= 'WHERE (ir.wf_child_instance_id = i.wf_instance_id) AND (ir.wf_parent_instance_id = ?) AND (ir.wf_parent_activity_id = ?)'; 275 276 $result = $this->db->query($query, array($instanceID, $activityID)); 269 $query = 'SELECT i.wf_instance_id AS wf_instance_id, ' . 270 ' ia.wf_activity_id AS wf_activity_id, ' . 271 ' i.wf_started AS wf_started, ' . 272 ' i.wf_name AS wf_name, ' . 273 ' i.wf_status AS wf_status, ' . 274 ' ia.wf_user AS wf_user, ' . 275 ' ir.wf_parent_lock AS wf_parent_lock ' . 276 ' FROM egw_wf_interinstance_relations ir, egw_wf_instances i ' . 277 ' LEFT JOIN egw_wf_instance_activities ia ' . 278 ' ON (ia.wf_instance_id = i.wf_instance_id) ' . 279 ' WHERE ' . 280 ' (ir.wf_child_instance_id = i.wf_instance_id) AND (ir.wf_parent_instance_id = ?) '; 281 282 $result = $this->db->query($query, array($instanceID)); 277 283 $output = $result->GetArray(-1); 278 284 -
sandbox/workflow/trunk/inc/local/classes/class.wf_natural.php
r795 r2858 1 1 <?php 2 require_once(PHPGW_SERVER_ROOT.SEP.'workflow'.SEP.'inc'.SEP.'natural'.SEP.'class.natural.php'); 2 /**************************************************************************\ 3 * eGroupWare * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 require_once(PHPGW_SERVER_ROOT.SEP.'workflow'.SEP.'inc'.SEP.'natural'.SEP.'class.natural.php'); 13 14 /** 15 * Mainframe connection to workflow 16 * 17 * TODO - This class should be removed from here. Its based on a not 18 * public protocol, thus cannot be used for everybody. 19 * 20 * @package Workflow 21 * @subpackage local 22 * @license http://www.gnu.org/copyleft/gpl.html GPL 23 * @author Everton Flávio Rufino Seára 24 */ 25 class wf_natural extends Natural 26 { 3 27 4 28 /** 5 * Mainframe connection to workflow 6 * @author Everton Flávio Rufino Seára 7 * @package Workflow 8 * @subpackage local 9 * @license http://www.gnu.org/copyleft/gpl.html GPL 10 **/ 29 * @var object Log Object 30 * @access private 31 */ 32 private $logger = null; 11 33 12 class wf_natural extends Natural34 function __construct() 13 35 { 36 parent::Natural(); 14 37 15 function __construct() 16 { 17 parent::Natural(); 38 $natconf = array( 39 'mainframe_ip' => '', 40 'mainframe_port' => '', 41 'mainframe_key' => '', 42 'mainframe_password' => '', 43 'mainframe_environment' => '' 44 ); 18 45 19 $natconf = array( 20 'mainframe_ip' => '', 21 'mainframe_port' => '', 22 'mainframe_key' => '', 23 'mainframe_password' => '', 24 'mainframe_environment' => '' 25 ); 46 $nat_conf_values = &Factory::getInstance('workflow_wfruntime')->getConfigValues($natconf); 26 47 27 $nat_conf_values = $GLOBALS['workflow']['wf_runtime']->getConfigValues($natconf); 48 $this->setIPAddress($nat_conf_values['mainframe_ip']); 49 $this->setServerPort($nat_conf_values['mainframe_port']); 50 $this->setKey($nat_conf_values['mainframe_key']); 51 $this->setPassword($nat_conf_values['mainframe_password']); 52 $this->setApplication($nat_conf_values['mainframe_environment']); 28 53 29 $this->setIPAddress($nat_conf_values['mainframe_ip']); 30 $this->setServerPort($nat_conf_values['mainframe_port']); 31 $this->setKey($nat_conf_values['mainframe_key']); 32 $this->setPassword($nat_conf_values['mainframe_password']); 33 $this->setApplication($nat_conf_values['mainframe_environment']); 54 $this->logger = &Factory::getInstance('Logger', array('file')); 55 } 56 57 /** 58 * This method MUST be called before using execute method 59 * It specifies the natural sub-program to be accessed. 60 * 61 * @param Object $obj Object that specifies natural sub-program properties 62 * @return void 63 */ 64 public function configure($obj) 65 { 66 $this->obj = $obj; 67 68 $this->initialize($obj->name); 69 70 if ($obj->server != NULL){ 71 $this->setIPAddress($obj->server); 34 72 } 35 36 /** 37 * Method to configure the access to mainframe 38 * This method MUST be called before using execute method, else 'false' will be returned 39 * 40 * Only the first and second param are mandatory. 41 * 42 * @param String $subProgram - Name of sub-program 43 * @param String $inputParameter - Input parameters to sub-program 44 * 45 * @param String $ip - IP Address of Mainfram 46 * @param int $port - ServerPort to access the mainframe 47 * @param String $key - Access key (user) 48 * @param String $password - Key (user) password 49 * @param char $environment - Application environment access 'D' (development) or 'P' (production) 50 51 */ 52 53 public function configure($obj) 54 { 55 $this->obj = $obj; 56 57 $this->initialize($obj->name); 58 59 if ($obj->server != NULL){ 60 $this->setIPAddress($obj->server); 61 } 62 if ($obj->port != NULL){ 63 $this->setServerPort($obj->port); 64 } 65 if ($obj->key != NULL){ 66 $this->setKey($obj->key); 67 } 68 if ($obj->password != NULL){ 69 $this->setPassword($obj->password); 70 } 71 if ($obj->environment != NULL){ 72 $this->setApplication($obj->environment); 73 } 74 if ($obj->logon != NULL){ 75 $this->setLogon($obj->logon); 76 } 77 if ($obj->system != NULL){ 78 $this->setSystem($obj->system); 79 } 80 if ($obj->rc != NULL){ 81 $this->setRC($obj->rc); 82 } 73 if ($obj->port != NULL){ 74 $this->setServerPort($obj->port); 83 75 } 84 85 /* 86 87 public function configure($subProgram, $inputParameter, $ip = NULL, $port = NULL, 88 $key = NULL, $password = NULL, $environment = NULL, $logon = NULL, $system = NULL, $rc = NULL) 89 { 90 $this->initialize($subProgram, $inputParameter); 91 92 if ($ip != NULL){ 93 $this->setIPAddress($ip); 94 } 95 if ($port != NULL){ 96 $this->setServerPort($port); 97 } 98 if ($key != NULL){ 99 $this->setKey($key); 100 } 101 if ($password != NULL){ 102 $this->setPassword($password); 103 } 104 if ($environment != NULL){ 105 $this->setApplication($environment); 106 } 107 if ($logon != NULL){ 108 $this->setLogon($logon); 109 } 110 if ($system != NULL){ 111 $this->setSystem($system); 112 } 113 if ($rc != NULL){ 114 $this->setRC($rc); 115 } 116 76 if ($obj->key != NULL){ 77 $this->setKey($obj->key); 117 78 } 118 119 */ 120 121 /** 122 * Access and retrieve data from mainframe 123 * @return bool 124 */ 125 public function execute($inputParams = "") 126 { 127 return parent::execute($inputParams); 79 if ($obj->password != NULL){ 80 $this->setPassword($obj->password); 81 } 82 if ($obj->environment != NULL){ 83 $this->setApplication($obj->environment); 84 } 85 if ($obj->logon != NULL){ 86 $this->setLogon($obj->logon); 87 } 88 if ($obj->system != NULL){ 89 $this->setSystem($obj->system); 90 } 91 if ($obj->rc != NULL){ 92 $this->setRC($obj->rc); 128 93 } 129 94 } 95 96 /** 97 * Method for accessing and retrieving data from mainframe 98 * @return bool 99 */ 100 public function execute($inputParams = "") 101 { 102 // execute action and log wasted time 103 $totalTime = microtime(true); 104 $result = parent::execute($inputParams); 105 $totalTime = microtime(time) - $totalTime; 106 $log = sprintf("WF_NATURAL [subprogram=%s] [time=%ss]", 107 $this->obj->name, 108 number_format($totalTime,3) 109 ); 110 $this->logger->debug($log); 111 return $result; 112 } 113 } 130 114 ?> -
sandbox/workflow/trunk/js/orgchart/organization.js
r2063 r2858 483 483 data[i]['tr_attributes']['class'] = "linha" + i%2; 484 484 data[i]['tr_attributes']['className'] = "linha" + i%2; 485 data[i]['funcionario_id_desc'] = '<a href="javascript:void(0)" class="lbOn" onmouseover="getEmployeeInfoTimer(event, ' + data[i]['funcionario_id'] + ', ' + organizationID + '); return false;" onmouseout="hideEmployeeInfo(); return false;" onclick="loadAddEmployeeUI(' + organizationID + ', function(){objEmployee.fillForm(' + dataHash.customInspect() + ')}); $(\'addEmployeeLink\').parentNode.removeChild($(\'addEmployeeLink\')); return false;">' + data[i]['funcionario_id_desc'] + '</a>' + (data[i]['removed'] ? ' <font color="red">( excluído)</font>' : '');485 data[i]['funcionario_id_desc'] = '<a href="javascript:void(0)" class="lbOn" onmouseover="getEmployeeInfoTimer(event, ' + data[i]['funcionario_id'] + ', ' + organizationID + '); return false;" onmouseout="hideEmployeeInfo(); return false;" onclick="loadAddEmployeeUI(' + organizationID + ', function(){objEmployee.fillForm(' + dataHash.customInspect() + ')}); $(\'addEmployeeLink\').parentNode.removeChild($(\'addEmployeeLink\')); return false;">' + data[i]['funcionario_id_desc'] + '</a>' + (data[i]['removed'] ? ' <font color="red">(inativo)</font>' : ''); 486 486 data[i]['actions'] = '<a href="#" onclick="objEmployee.remove({\'funcionario_id\': ' + data[i]['funcionario_id'] + ', \'organizacao_id\': ' + organizationID + '} , this.parentNode.parentNode); return false;"><img border="0" width="16" height="16" src="workflow/templateFile.php?file=images/button_cancel.png" /></a>'; 487 487 } … … 537 537 data[i]['tr_attributes']['class'] = "linha" + i%2; 538 538 data[i]['tr_attributes']['className'] = "linha" + i%2; 539 data[i]['funcionario_id_desc'] = '<a href="javascript:void(0)" class="lbOn" onmouseover="getEmployeeInfoTimer(event, ' + data[i]['funcionario_id'] + ', ' + organizationID + '); return false;" onmouseout="hideEmployeeInfo(); return false;" onclick="loadAddEmployeeUI(' + organizationID + ', function(){objEmployee.fillForm(' + dataHash.customInspect() + ')}); $(\'addEmployeeLink\').parentNode.removeChild($(\'addEmployeeLink\')); return false;">' + data[i]['funcionario_id_desc'] + ' ' + complement + '</a>' + (data[i]['removed'] ? ' <font color="red">( excluído)</font>' : '');539 data[i]['funcionario_id_desc'] = '<a href="javascript:void(0)" class="lbOn" onmouseover="getEmployeeInfoTimer(event, ' + data[i]['funcionario_id'] + ', ' + organizationID + '); return false;" onmouseout="hideEmployeeInfo(); return false;" onclick="loadAddEmployeeUI(' + organizationID + ', function(){objEmployee.fillForm(' + dataHash.customInspect() + ')}); $(\'addEmployeeLink\').parentNode.removeChild($(\'addEmployeeLink\')); return false;">' + data[i]['funcionario_id_desc'] + ' ' + complement + '</a>' + (data[i]['removed'] ? ' <font color="red">(inativo)</font>' : ''); 540 540 data[i]['actions'] = '<a href="#" onclick="objEmployee.remove({\'funcionario_id\': ' + data[i]['funcionario_id'] + ', \'organizacao_id\': ' + organizationID + '} , this.parentNode.parentNode); return false;"><img border="0" width="16" height="16" src="workflow/templateFile.php?file=images/button_cancel.png" /></a>'; 541 541 window.scrollTo(0,0); -
sandbox/workflow/trunk/js/userinterface/orgchart.js
r2371 r2858 348 348 complement = ''; 349 349 if (employees[i]['removed']) 350 complement += ' <font color="red">( excluído)</font>';350 complement += ' <font color="red">(inativo)</font>'; 351 351 content += '<tr class="linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '" onmouseover="this.className=\'highlight0\'" onmouseout="this.className=\'linha'+ i%2 + (useCategories ? ' categoria_' + employees[i]['funcionario_categoria_id'] : '') + '\'">'; 352 352 content += '<td><a href="javascript:void(0);" onmouseover="getEmployeeInfoTimer(event, ' + employees[i]['funcionario_id'] + '); return false;" onmouseout="hideEmployeeInfo(); return false;">' + employees[i]['cn'] + complement + '</a></td>'; -
sandbox/workflow/trunk/lib/factory/WorkflowFactory.php
r2466 r2858 63 63 $this->registerFileInfo('Thread', 'class.Thread.inc.php', 'inc'); 64 64 $this->registerFileInfo('Paging', 'class.Paging.inc.php', 'inc'); 65 $this->registerFileInfo('Logger', 'class.Logger.inc.php', 'inc'); 65 66 $this->registerFileInfo('FsUtils', 'class.fsutils.inc.php', 'inc'); 66 67 $this->registerFileInfo('UserPictureProvider', 'class.UserPictureProvider.inc.php', 'inc'); … … 168 169 169 170 171 /** 172 * TODO - This is another ATR - Alternative Technical Resource (common known 173 * as workaround) to allow instantiation of "wf" classes. Although these classes 174 * should have not been instanciated by the workflow module, some of them are 175 * instantiated by run_activity during every execution. =( 176 * In a new version of MVC these objects must be created by the Processes. 177 */ 178 $this->registerFileInfo('wf_natural', 'class.wf_natural.php', 'inc/local/classes'); 179 $this->registerFileInfo('wf_db', 'class.wf_db.php', 'inc/local/classes'); 180 181 170 182 /* ok. no more instances of this class.. */ 171 183 self::$_instantiated = true; -
sandbox/workflow/trunk/setup/default_records.inc.php
r2042 r2858 59 59 $GLOBALS['phpgw']->ADOdb->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES(?, ?, ?)", array('workflow', 'log_type_file', 'True')); 60 60 $GLOBALS['phpgw']->ADOdb->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES(?, ?, ?)", array('workflow', 'log_type_firebug', 'True')); 61 $GLOBALS['phpgw']->ADOdb->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES(?, ?, ?)", array('workflow', 'log_level', ' 7'));61 $GLOBALS['phpgw']->ADOdb->query("INSERT INTO phpgw_config (config_app, config_name, config_value) VALUES(?, ?, ?)", array('workflow', 'log_level', '0')); 62 62 63 63 /* connect to the new database */ -
sandbox/workflow/trunk/setup/tables_update.inc.php
r2590 r2858 1238 1238 if (!$GLOBALS['phpgw_setup']->oProc->m_bDeltaOnly) 1239 1239 { 1240 /* updating log level */ 1241 $values = array('0', 'workflow', 'log_level'); 1242 $GLOBALS['phpgw']->ADOdb->query('UPDATE phpgw_config SET config_value=? WHERE config_app=? AND config_name=?', $values); 1243 1240 1244 $workflowHostInfo = extractDatabaseParameters(); 1241 1245
Note: See TracChangeset
for help on using the changeset viewer.