Merged 3.0.1.8 into MT-10
This commit is contained in:
@@ -193,6 +193,19 @@ class InputDocument
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_PROCESS_PERMISSIONS");
|
||||
}
|
||||
|
||||
//Variables
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\ProcessVariablesPeer::VAR_UID);
|
||||
$criteria->add(\ProcessVariablesPeer::INP_DOC_UID, $inputDocumentUid);
|
||||
|
||||
$rsCriteria = \ProcessVariablesPeer::doSelectRS($criteria);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$flagAssigned = true;
|
||||
$arrayData[] = \G::LoadTranslation("ID_VARIABLES");
|
||||
}
|
||||
|
||||
//Return
|
||||
return array($flagAssigned, $arrayData);
|
||||
|
||||
@@ -538,20 +538,42 @@ class Process
|
||||
|
||||
$trigger = new \ProcessMaker\BusinessModel\Trigger();
|
||||
|
||||
/**
|
||||
* Try catch block is added to escape the exception and continue editing
|
||||
* the properties of the process, otherwise there is no way to edit
|
||||
* the properties that the exception is thrown: trigger nonexistent.
|
||||
* The same goes for the similar blocks.
|
||||
*/
|
||||
if (isset($arrayData["PRO_TRI_DELETED"]) && $arrayData["PRO_TRI_DELETED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_DELETED"], $processUid, $this->arrayFieldNameForException["processTriDeleted"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_DELETED"], $processUid, $this->arrayFieldNameForException["processTriDeleted"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_CANCELED"]) && $arrayData["PRO_TRI_CANCELED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_CANCELED"], $processUid, $this->arrayFieldNameForException["processTriCanceled"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_CANCELED"], $processUid, $this->arrayFieldNameForException["processTriCanceled"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_PAUSED"]) && $arrayData["PRO_TRI_PAUSED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_PAUSED"], $processUid, $this->arrayFieldNameForException["processTriPaused"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_PAUSED"], $processUid, $this->arrayFieldNameForException["processTriPaused"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_TRI_REASSIGNED"]) && $arrayData["PRO_TRI_REASSIGNED"] . "" != "") {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_REASSIGNED"], $processUid, $this->arrayFieldNameForException["processTriReassigned"]);
|
||||
try {
|
||||
$trigger->throwExceptionIfNotExistsTrigger($arrayData["PRO_TRI_REASSIGNED"], $processUid, $this->arrayFieldNameForException["processTriReassigned"]);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($arrayData["PRO_PARENT"])) {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user