This commit is contained in:
Paula V. Quispe
2016-03-30 16:27:27 -04:00
parent eadca40d08
commit 3c3a147e29
2 changed files with 7 additions and 3 deletions

View File

@@ -1560,8 +1560,8 @@ class Cases
$pausedTask[] = $row;
}
if (count($pausedTask) == 0) {
return false; // return false because there is not any delegation for this task.
if (count($pausedTask) === 0) {
return array(); // return false because there is not any delegation for this task.
} else {
return array('pause' => $pausedTask);
}

View File

@@ -1129,8 +1129,12 @@ class Derivation
switch ($routeType) {
case "SEC-JOIN":
$arrayOpenThread = ($flagTaskIsMultipleInstance && $flagTaskAssignTypeIsMultipleInstance)? $this->case->searchOpenPreviousTasks($currentDelegation["TAS_UID"], $currentDelegation["APP_UID"]) : array();
$arrayOpenThread = array_merge($arrayOpenThread, $this->case->getOpenSiblingThreads($nextDel["TAS_UID"], $currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"], $currentDelegation["TAS_UID"]));
$arraySiblings = $this->case->getOpenSiblingThreads($nextDel["TAS_UID"], $currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"], $currentDelegation["TAS_UID"]);
if(is_array($arrayOpenThread) && is_array($arraySiblings)){
$arrayOpenThread = array_merge($arrayOpenThread, $arraySiblings);
}
$canDerivate = empty($arrayOpenThread);
break;
default:
$canDerivate = true;