- Thu May 24, 2018 11:27 am
#814523
I create another process reminder.
The reminder process has a task code that should notify the person if he has not filled out the form.
it's ok?
And when i execute timereverection they warning me something.
The reminder process has a task code that should notify the person if he has not filled out the form.
it's ok?
Code: Select all
//find the task ID by running a case in the other process and look at the TASK system variable:
$taskId = '//number by taskid//';
//set to the same email address used in Admin > Settings > Email Servers:
$emailFrom = 'test@mail.com';
$g = new G();
$now = date('Y-m-d H:i:s');
$query= "SELECT * FROM APP_CACHE_VIEW WHERE TAS_UID='$taskId' AND
(APP_STATUS='TO_DO' OR APP_STATUS='DRAFT') AND DEL_THREAD_STATUS='OPEN' AND
'$now' > DEL_TASK_DUE_DATE";
$aCases = executeQuery($query);
if (!is_array($aCases)) {
die("Error: Bad Query: $query\n");
}
foreach ($aCases as $aCase) {
$c = new Cases();
$aCaseInfo = $c->loadCase($aCase['APP_UID'], $aCase['DEL_INDEX']);
$aData = array(
'caseNo' => $aCase['APP_NUMBER'],
'caseTitle' => $aCase['APP_TITLE'],
'caseStatus' => $aCase['APP_STATUS'],
'taskName' => $aCase['APP_TASK_TITLE'],
'taskAssignedDate' => $aCase['DEL_DELEGATE_DATE'],
'taskDueDate' => $aCase['DEL_TASK_DUE_DATE'],
'caseCreatedBy' => $aCaseInfo['CREATOR'],
'caseStartDate' => $aCaseInfo['CREATE_DATE'],
'caseUpdatedDate'=> $aCaseInfo['UPDATE_DATE'],
'caseLink' => ($g->is_https() ? "https://" : "http://") . $_SERVER['SERVER_NAME'] .
':' . $_SERVER['SERVER_PORT'] . //comment out if no port number
'/sys'.@@SYS_SYS.'/'.@@SYS_LANG.'/'.@@SYS_SKIN.'/cases/open?APP_UID=' .
$aCase['APP_UID'] . '&DEL_INDEX=' . $aCase['DEL_INDEX'] . '&action=draft'
);
$aUser = userInfo($aCase['USR_UID']);
PMFSendMessage($emailFrom, $aUser['mail'], '', '', 'Overdue case ' . $aCase['APP_TITLE'],
'overdueCase.html', $aData);
print "\nSending email to {$aUser['mail']} for case {$aCase['APP_TITLE']}\n";
}
And when i execute timereverection they warning me something.
Last edited by Processnico on Tue May 29, 2018 3:47 am, edited 1 time in total.