This commit is contained in:
Andrea Adamczyk
2019-04-17 15:56:20 -04:00
parent 6f64daeb2b
commit a4c63a1c36
2 changed files with 64 additions and 48 deletions

View File

@@ -394,6 +394,12 @@ class Ajax
print(G::json_encode($processData));
}
/**
* Get the task information of the current task
*
* @see workflow/engine/templates/cases/open->taskInformation()
* @link https://wiki.processmaker.com/3.3/Cases/Information#Task_Information
*/
public function getTaskInformation()
{
if (!isset($_SESSION['USER_LOGGED'])) {
@@ -408,7 +414,15 @@ class Ajax
if ($_SESSION['TASK'] == '-1') {
$_SESSION['TASK'] = $_SESSION['CURRENT_TASK'];
}
$taskData = $task->getDelegatedTaskData($_SESSION['TASK'], $_SESSION['APPLICATION'], $_SESSION['INDEX']);
$arrayTaskUid = explode('|', $_SESSION['TASK']);
if (count($arrayTaskUid) > 1) {
$arrayTaskUid = array_unique($arrayTaskUid);
}
$taskUid = $arrayTaskUid[0];
$taskData = $task->getDelegatedTaskData($taskUid, $_SESSION['APPLICATION'], $_SESSION['INDEX']);
$taskData = \ProcessMaker\Util\DateTime::convertUtcToTimeZone($taskData);