From df70b70398babd69cc6238bed9d3496ec56430b7 Mon Sep 17 00:00:00 2001 From: Dheeyi William Date: Tue, 7 Jun 2016 12:50:45 -0400 Subject: [PATCH] HOR-1056 Pausing a parallel task in a subprocess causes a serious misbehavior HOR-1056 Pausing a parallel task in a subprocess causes a serious misbehavior --- workflow/engine/classes/class.derivation.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.derivation.php b/workflow/engine/classes/class.derivation.php index e93693443..4b092365d 100755 --- a/workflow/engine/classes/class.derivation.php +++ b/workflow/engine/classes/class.derivation.php @@ -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; }