Merged in qronald/processmaker/3.0.1-GA (pull request #2565)
fix in execute triggers assigment
This commit is contained in:
@@ -334,9 +334,18 @@ class Light
|
|||||||
*
|
*
|
||||||
* return array Return an array with Task Case
|
* return array Return an array with Task Case
|
||||||
*/
|
*/
|
||||||
public function GetPrepareInformation($usr_uid, $app_uid, $del_index = null)
|
public function GetPrepareInformation($usr_uid, $tas_uid, $app_uid, $del_index = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$oCase = new \Cases();
|
||||||
|
|
||||||
|
$triggers = $oCase->loadTriggers( $tas_uid, 'ASSIGN_TASK', '-1', 'BEFORE');
|
||||||
|
if (isset($triggers)){
|
||||||
|
$cases = new \ProcessMaker\BusinessModel\Cases();
|
||||||
|
foreach($triggers as $trigger){
|
||||||
|
$cases->putExecuteTriggerCase($app_uid, $trigger['TRI_UID'], $usr_uid);
|
||||||
|
}
|
||||||
|
}
|
||||||
$oDerivation = new \Derivation();
|
$oDerivation = new \Derivation();
|
||||||
$aData = array();
|
$aData = array();
|
||||||
$aData['APP_UID'] = $app_uid;
|
$aData['APP_UID'] = $app_uid;
|
||||||
|
|||||||
@@ -586,7 +586,7 @@ class Light extends Api
|
|||||||
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
|
$task->setArrayParamException(array("taskUid" => "act_uid", "stepUid" => "step_uid"));
|
||||||
|
|
||||||
$activitySteps = $task->getSteps($act_uid);
|
$activitySteps = $task->getSteps($act_uid);
|
||||||
|
$_SESSION['PROCESS'] = $prj_uid;
|
||||||
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
|
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
|
||||||
$dynaForm->setFormatFieldNameInUppercase(false);
|
$dynaForm->setFormatFieldNameInUppercase(false);
|
||||||
$oMobile = new \ProcessMaker\BusinessModel\Light();
|
$oMobile = new \ProcessMaker\BusinessModel\Light();
|
||||||
@@ -644,9 +644,11 @@ class Light extends Api
|
|||||||
$cases->putExecuteTriggerCase($cas_uid, $trigger['tri_uid'], $userUid);
|
$cases->putExecuteTriggerCase($cas_uid, $trigger['tri_uid'], $userUid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$response = array('status' => 'ok');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
}
|
}
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -732,17 +734,18 @@ class Light extends Api
|
|||||||
* Return Informaction User for derivate
|
* Return Informaction User for derivate
|
||||||
* assignment Users
|
* assignment Users
|
||||||
*
|
*
|
||||||
* @url GET /case/:app_uid/:del_index/assignment
|
* @url GET /task/:tas_uid/case/:app_uid/:del_index/assignment
|
||||||
*
|
*
|
||||||
|
* @param string $tas_uid {@min 32}{@max 32}
|
||||||
* @param string $app_uid {@min 32}{@max 32}
|
* @param string $app_uid {@min 32}{@max 32}
|
||||||
* @param string $del_index
|
* @param string $del_index
|
||||||
*/
|
*/
|
||||||
public function doGetPrepareInformation($app_uid, $del_index = null)
|
public function doGetPrepareInformation($tas_uid, $app_uid, $del_index = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$usr_uid = $this->getUserId();
|
$usr_uid = $this->getUserId();
|
||||||
$oMobile = new \ProcessMaker\BusinessModel\Light();
|
$oMobile = new \ProcessMaker\BusinessModel\Light();
|
||||||
$response = $oMobile->getPrepareInformation($usr_uid, $app_uid, $del_index);
|
$response = $oMobile->getPrepareInformation($usr_uid, $tas_uid, $app_uid, $del_index);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user