Esempio n. 1
0
 /**
  * Get next step
  *
  * @param string $pro_uid  {@min 1}{@max 32}
  * @param string $app_uid  {@min 1}{@max 32}
  * @param int $cas_index
  * @param int $step_pos
  *
  * @url GET /process/:pro_uid/case/:app_uid/:cas_index/step/:step_pos
  */
 public function doGetNextStep($pro_uid, $app_uid, $cas_index, $step_pos)
 {
     try {
         $oCase = new \Cases();
         $userUid = $this->getUserId();
         $_SESSION["APPLICATION"]  = $app_uid;
         $_SESSION["PROCESS"]      = $pro_uid;
         //$_SESSION["TASK"]         = "";
         $_SESSION["INDEX"]        = $cas_index;
         $_SESSION["USER_LOGGED"]  = $userUid;
         //$_SESSION["USR_USERNAME"] = "";
         $response = $oCase->getNextStep($pro_uid, $app_uid, $cas_index, $step_pos );
     } catch (\Exception $e) {
         throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
     }
     return $response;
 }
Esempio n. 2
0
 /**
  * Delete case
  *
  * @copyright Colosa - Bolivia
  *
  * @url DELETE /case/:app_uid/delete
  *
  * @param string $app_uid {@min 32}{@max 32}
  */
 public function doDeleteCases($app_uid)
 {
     try {
         $oCase = new \Cases();
         $oCase->removeCase( $app_uid );
         $result = array (
             "message" => \G::LoadTranslation( "ID_COMMAND_EXECUTED_SUCCESSFULLY" )
         );
     } catch (\Exception $e) {
         throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
     }
     return $result;
 }