Merged in qronald/processmaker/HOR-671 (pull request #4021)

HOR-671
This commit is contained in:
Julio Cesar Laura Avendaño
2016-03-31 16:54:13 -04:00

View File

@@ -715,6 +715,28 @@ class Light extends Api
return $response;
}
/**
* Get Already Route
*
* @param string $app_uid {@min 1}{@max 32}
* @param int $cas_index
*
* @status 204
* @url GET /case/:app_uid/:cas_index
*/
public function doIfAlreadyRoute($app_uid, $cas_index)
{
try {
$oAppDelegate = new \AppDelegation();
$alreadyRouted = $oAppDelegate->alreadyRouted($app_uid, $cas_index);
if ($alreadyRouted) {
throw (new RestException(Api::STAT_APP_EXCEPTION, G::LoadTranslation('ID_CASE_DELEGATION_ALREADY_CLOSED')));
}
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}
}
/**
*
* @url GET /project/:prj_uid/dynaforms