Merged in dheeyi/processmaker/HOR-1056-A (pull request #4366)

HOR-1056
This commit is contained in:
Julio Cesar Laura Avendaño
2016-06-07 18:07:25 -04:00

View File

@@ -1344,12 +1344,19 @@ class Derivation
///////
$flag = false;
if ($openThreads == 0) {
//check if there is any paused thread
$existThreadPaused = false;
if (isset($arraySiblings['pause'])) {
if (!empty($arraySiblings['pause'])) {
$existThreadPaused = true;
}
}
if ($openThreads == 0 && !$existThreadPaused) {
//Close case
$appFields["APP_STATUS"] = "COMPLETED";
$appFields["APP_FINISH_DATE"] = "now";
$this->verifyIsCaseChild($currentDelegation["APP_UID"], $currentDelegation["DEL_INDEX"]);
$flag = true;
}