From 62f7030744fa659104b8e9d61afeb794171be999 Mon Sep 17 00:00:00 2001 From: Daniel Rojas Date: Wed, 16 Apr 2014 13:04:58 -0400 Subject: [PATCH] Se ajustan mensajes de error en cases action --- workflow/engine/src/ProcessMaker/BusinessModel/Cases.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php index 4defc5ec0..d4d3adb5c 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Cases.php @@ -589,6 +589,11 @@ class Cases $fields = $ws->newCaseImpersonate($processUid, $userUid, $variables, $taskUid); $array = json_decode(json_encode($fields), true); if ($array ["status_code"] != 0) { + if ($array ["status_code"] == 12) { + throw (new \Exception( G::loadTranslation( 'ID_NO_STARTING_TASK' ) . '. \'tas_uid\'.')); + } elseif ($array ["status_code"] == 13) { + throw (new \Exception( G::loadTranslation( 'ID_MULTIPLE_STARTING_TASKS' ) . '. \'tas_uid\'.')); + } throw (new \Exception($array ["message"])); } else { $array['app_uid'] = $array['caseId']; @@ -626,7 +631,7 @@ class Cases } \G::LoadClass('wsBase'); $ws = new \wsBase(); - $fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidTarget, $userUidSource); + $fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidSource, $userUidTarget); $array = json_decode(json_encode($fields), true); if (array_key_exists("status_code", $array)) { if ($array ["status_code"] != 0) {