Merged in darojas/processmaker (pull request #374)
Se agregan unit test para cases 7_12. Se resuelven conflictos de merge. Se agregan unit test para INPUT DOCUMENTS y se agregan validaciones.
This commit is contained in:
@@ -608,14 +608,18 @@ class Cases
|
||||
}
|
||||
\G::LoadClass('wsBase');
|
||||
$ws = new \wsBase();
|
||||
$fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidSource, $userUidTarget);
|
||||
$fields = $ws->reassignCase($userUid, $applicationUid, $delIndex, $userUidTarget, $userUidSource);
|
||||
$array = json_decode(json_encode($fields), true);
|
||||
if ($array ["status_code"] != 0) {
|
||||
throw (new \Exception($array ["message"]));
|
||||
if (array_key_exists("status_code", $array)) {
|
||||
if ($array ["status_code"] != 0) {
|
||||
throw (new \Exception($array ["message"]));
|
||||
} else {
|
||||
unset($array['status_code']);
|
||||
unset($array['message']);
|
||||
unset($array['timestamp']);
|
||||
}
|
||||
} else {
|
||||
unset($array['status_code']);
|
||||
unset($array['message']);
|
||||
unset($array['timestamp']);
|
||||
throw (new \Exception('The Application with app_uid: '.$applicationUid.' doesn\'t exist'));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
|
||||
@@ -58,6 +58,10 @@ class InputDocument
|
||||
public function getCasesInputDocument($applicationUid, $userUid, $inputDocumentUid)
|
||||
{
|
||||
try {
|
||||
$oAppDocument = \AppDocumentPeer::retrieveByPK( $inputDocumentUid, 1 );
|
||||
if (is_null( $oAppDocument ) || $oAppDocument->getAppDocStatus() == 'DELETED') {
|
||||
throw (new \Exception('This input document with id: '.$inputDocumentUid.' doesn\'t exist!'));
|
||||
}
|
||||
$sApplicationUID = $applicationUid;
|
||||
$sUserUID = $userUid;
|
||||
\G::LoadClass('case');
|
||||
|
||||
Reference in New Issue
Block a user