Conflicts:
	workflow/engine/src/ProcessMaker/BusinessModel/Light.php
This commit is contained in:
dante
2017-12-21 14:23:51 -04:00
committed by Paula Quispe
parent f5b5e08554
commit 5d5bf2ca11
4 changed files with 21 additions and 13 deletions

View File

@@ -1106,11 +1106,11 @@ class Cases
* @param string $applicationUid Unique id of Case
* @param string $userUid Unique id of User
* @param string $delIndex
* @param string $bExecuteTriggersBeforeAssignment
* @param boolean $executeTriggersBeforeAssignment
*
* return array Return an array with Task Case
*/
public function updateRouteCase($applicationUid, $userUid, $delIndex)
public function updateRouteCase($applicationUid, $userUid, $delIndex, $executeTriggersBeforeAssignment)
{
try {
if (!$delIndex) {
@@ -1124,8 +1124,7 @@ class Cases
}
$ws = new WsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex,
$bExecuteTriggersBeforeAssignment = false);
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $executeTriggersBeforeAssignment);
$array = json_decode(json_encode($fields), true);
if ($array ["status_code"] != 0) {
throw (new Exception($array ["message"]));

View File

@@ -547,12 +547,12 @@ class Light
* @param string $applicationUid Unique id of Case
* @param string $userUid Unique id of User
* @param string $delIndex
* @param array $tasks
* @param string $bExecuteTriggersBeforeAssignment
* @param string $tasks
* @param boolean $executeTriggersBeforeAssignment
*
* return array Return an array with Task Case
*/
public function updateRouteCase($applicationUid, $userUid, $delIndex, $tasks)
public function updateRouteCase($applicationUid, $userUid, $delIndex, $tasks, $executeTriggersBeforeAssignment)
{
try {
if (!$delIndex) {
@@ -560,8 +560,15 @@ class Light
}
$ws = new \WsBase();
$fields = $ws->derivateCase($userUid, $applicationUid, $delIndex, $bExecuteTriggersBeforeAssignment = false,
$tasks);
$fields = $ws->derivateCase(
$userUid,
$applicationUid,
$delIndex,
$executeTriggersBeforeAssignment,
$tasks
);
$array = json_decode(json_encode($fields), true);
$array['message'] = trim(strip_tags($array['message']));
if ($array ["status_code"] != 0) {

View File

@@ -860,18 +860,19 @@ class Cases extends Api
*
* @param string $app_uid {@min 32}{@max 32}
* @param string $del_index {@from body}
* @param boolean $executeTriggersBeforeAssignment {@from body}
*
* @throws RestException
*
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function doPutRouteCase($app_uid, $del_index = null)
public function doPutRouteCase($app_uid, $del_index = null, $executeTriggersBeforeAssignment = false)
{
try {
$userUid = $this->getUserId();
$cases = new BmCases();
$cases->updateRouteCase($app_uid, $userUid, $del_index);
$cases->updateRouteCase($app_uid, $userUid, $del_index, $executeTriggersBeforeAssignment);
} catch (Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}

View File

@@ -1196,6 +1196,7 @@ class Light extends Api
* @param string $app_uid {@min 32}{@max 32}
* @param int $del_index {@from body}
* @param array $tasks {@from body}
* @param boolean $executeTriggersBeforeAssignment {@from body}
*
* @return array
* @throws RestException
@@ -1203,11 +1204,11 @@ class Light extends Api
* @access protected
* @class AccessControl {@permission PM_CASES}
*/
public function doPutRouteCase($app_uid, $del_index = null, $tasks = array())
public function doPutRouteCase($app_uid, $del_index = null, $tasks = array(), $executeTriggersBeforeAssignment = false)
{
try {
$oMobile = new BusinessModelLight();
$response = $oMobile->updateRouteCase($app_uid, $this->getUserId(), $del_index, $tasks);
$response = $oMobile->updateRouteCase($app_uid, $this->getUserId(), $del_index, $tasks, $executeTriggersBeforeAssignment);
} catch (Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}