function ReassignCase($params) { ifSessionExpiredBreakThis($params->sessionId); //G::LoadClass('wsResponse'); //return new wsResponse (1, print_r($params,1)); G::LoadClass('wsBase'); $ws = new wsBase(); $res = $ws->reassignCase($params->sessionId, $params->caseId, $params->delIndex, $params->userIdSource, $params->userIdTarget); return $res; }
function ReassignCase($params) { $vsResult = isValidSession($params->sessionId); if ($vsResult->status_code !== 0) { return $vsResult; } $ws = new wsBase(); $res = $ws->reassignCase($params->sessionId, $params->caseId, $params->delIndex, $params->userIdSource, $params->userIdTarget); return $res; }
/** * Reassign Case * * @param string $applicationUid Unique id of Case * @param string $userUid Unique id of User * @param string $delIndex * @param string $userUidSource Unique id of User Source * @param string $userUid $userUidTarget id of User Target * * return array Return an array with Task Case */ public function updateReassignCase($applicationUid, $userUid, $delIndex, $userUidSource, $userUidTarget) { try { if (!$delIndex) { $delIndex = \AppDelegation::getCurrentIndex($applicationUid); } \G::LoadClass('wsBase'); $ws = new \wsBase(); $fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidSource, $userUidTarget); $array = json_decode(json_encode($fields), true); if (array_key_exists("status_code", $array)) { if ($array ["status_code"] != 0) { throw (new \Exception($array ["message"])); } else { unset($array['status_code']); unset($array['message']); unset($array['timestamp']); } } else { throw new \Exception(\G::LoadTranslation("ID_CASES_INCORRECT_INFORMATION", array($applicationUid))); } } catch (\Exception $e) { throw $e; } }