PM-2576 "Support for Timer-Event (End-points and Backend)" SOLVED

- Se a implementado el Timer-Event CRON, el cual se ejecuta con el siguiente comando:
    /path/to/processmaker/workflow/engine/bin$ php -f timereventcron.php +wMyWorkspace
- Se a implementado el registro de logs para el Timer-Event CRON
This commit is contained in:
Victor Saisa Lopez
2015-07-07 11:51:12 -04:00
parent a330a89351
commit a81099ea18
11 changed files with 967 additions and 68 deletions

View File

@@ -439,20 +439,21 @@ class Derivation
*/
function getNextAssignedUser ($tasInfo)
{
$oUser = new Users();
//$oUser = new Users();
$nextAssignedTask = $tasInfo['NEXT_TASK'];
$lastAssigned = $tasInfo['NEXT_TASK']['TAS_LAST_ASSIGNED'];
$sTasUid = $tasInfo['NEXT_TASK']['TAS_UID'];
// to do: we can increase the LOCATION by COUNTRY, STATE and LOCATION
/* Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
$assignLocation = '';
if ($tasInfo['NEXT_TASK']['TAS_ASSIGN_LOCATION'] == 'TRUE') {
$oUser->load( $tasInfo['USER_UID'] );
krumo( $oUser->getUsrLocation() );
//to do: assign for location
//$assignLocation = " AND USR_LOCATION = " . $oUser->Fields['USR_LOCATION'];
}
/* End - Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
//// to do: we can increase the LOCATION by COUNTRY, STATE and LOCATION
///* Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
//$assignLocation = '';
//if ($tasInfo['NEXT_TASK']['TAS_ASSIGN_LOCATION'] == 'TRUE') {
// $oUser->load( $tasInfo['USER_UID'] );
// krumo( $oUser->getUsrLocation() );
// //to do: assign for location
// //$assignLocation = " AND USR_LOCATION = " . $oUser->Fields['USR_LOCATION'];
//}
///* End - Verify if the next Task is set with the option "TAS_ASSIGN_LOCATION == TRUE" */
$uidUser = '';
switch ($nextAssignedTask['TAS_ASSIGN_TYPE']) {
@@ -507,7 +508,7 @@ class Derivation
$userFields['USR_EMAIL'] = '';
//get the report_to user & its full info
$useruid = $this->checkReplacedByUser( $this->getDenpendentUser( $tasInfo['USER_UID'] ) );
$useruid = ($tasInfo["USER_UID"] != "")? $this->checkReplacedByUser($this->getDenpendentUser($tasInfo["USER_UID"])) : "";
if (isset( $useruid ) && $useruid != '') {
$userFields = $this->getUsersFullNameFromArray( $useruid );