Exemplo n.º 1
0
    /**
     * starting one case
     *
     * @param string $userId
     * @param string $proUid
     * @param string $taskUid
     * @return array
     * @throws \Exception
     */
    public function startCase($userId = '', $proUid = '', $taskUid = '')
    {
        try {
            $oCase = new \Cases();

            $this->lookinginforContentProcess( $proUid );

            $aData = $oCase->startCase( $taskUid, $userId );

            $response = array();
            $response['caseId'] = $aData['APPLICATION'];
            $response['caseIndex'] = $aData['INDEX'];
            $response['caseNumber'] = $aData['CASE_NUMBER'];

        } catch (Exception $e) {
            $response['status'] = 'failure';
            $response['message'] = $e->getMessage();
        }
        return $response;
    }
Exemplo n.º 2
0
 /**
  * starting one case
  *
  * @param string $userId
  * @param string $proUid
  * @param string $taskUid
  * @return array
  * @throws \Exception
  */
 public function startCase($userId = '', $proUid = '', $taskUid = '')
 {
     try {
         $oCase = new \Cases();
         $oUser = new \Users();
         $this->lookinginforContentProcess($proUid);
         $aData = $oCase->startCase($taskUid, $userId);
         $aUserLog = $oUser->loadDetailed($userId);
         $_SESSION['APPLICATION'] = $aData['APPLICATION'];
         $_SESSION['INDEX'] = $aData['INDEX'];
         $_SESSION['PROCESS'] = $aData['PROCESS'];
         $_SESSION['TASK'] = $taskUid;
         $_SESSION["USER_LOGGED"] = $userId;
         $_SESSION["USR_USERNAME"] = $aUserLog['USR_USERNAME'];
         $aFields = $oCase->loadCase($aData['APPLICATION'], $aData['INDEX']);
         $oCase->updateCase($aData['APPLICATION'], $aFields);
         $response = array();
         $response['caseId'] = $aData['APPLICATION'];
         $response['caseIndex'] = $aData['INDEX'];
         $response['caseNumber'] = $aData['CASE_NUMBER'];
     } catch (Exception $e) {
         $response['status'] = 'failure';
         $response['message'] = $e->getMessage();
     }
     return $response;
 }