BUG 9370 "NewCaseImpersonate function not working when start..." SOLVED

- PMFNewCaseImpersonate function not working when start task of process to
  instance is assigned to group and not to user
- Delete validation "user assigned to task"
This commit is contained in:
Victor Saisa Lopez
2012-07-10 17:48:42 -04:00
parent f68bd1ccb9
commit 76f5bb2973

View File

@@ -1567,18 +1567,25 @@ class wsBase
return $result;
}
$oProcesses = new Processes();
$pro = $oProcesses->processExists($processId);
$processes = new Processes();
if (!$pro) {
if (!$processes->processExists($processId)) {
$result = new wsResponse(11, G::loadTranslation('ID_INVALID_PROCESS') . " " . $processId . "!!");
return $result;
}
$user = new Users();
if (!$user->userExists($userId)) {
$result = new wsResponse(11, G::loadTranslation('ID_USER_NOT_REGISTERED') . " " . $userId . "!!");
return $result;
}
$oCase = new Cases();
$arrayTask = $oProcesses->getStartingTaskForUser($processId, $userId);
$arrayTask = $processes->getStartingTaskForUser($processId, null);
$numTasks = count($arrayTask);
if ($numTasks == 1) {