CR corrections
This commit is contained in:
@@ -1236,19 +1236,22 @@ class Cases
|
||||
|
||||
public function multiInstanceIsCompleted($appUid, $tasUid, $previousDelIndex)
|
||||
{
|
||||
$result = false;
|
||||
try {
|
||||
$c = new Criteria();
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn('COUNT(*)');
|
||||
$c->add(AppDelegationPeer::APP_UID, $appUid);
|
||||
$c->add(AppDelegationPeer::TAS_UID, $tasUid);
|
||||
$c->add(AppDelegationPeer::DEL_PREVIOUS, $previousDelIndex);
|
||||
$c->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
|
||||
$rs = AppDelegationPeer::doSelectRs($c);
|
||||
$rs->next();
|
||||
$row = $rs->getRow();
|
||||
//if no open threads exists, the multiinstance is completes
|
||||
return intval($row[0]) === 0;
|
||||
|
||||
if ($rs->next()) {
|
||||
$result = false;
|
||||
} else {
|
||||
$result = true;
|
||||
}
|
||||
|
||||
} catch (exception $e) {
|
||||
throw ($e);
|
||||
}
|
||||
|
||||
@@ -1015,11 +1015,10 @@ class Derivation
|
||||
//is triggered:
|
||||
if (isset($nextDel["TAS_UID_DUMMY"]) && $flagTaskAssignTypeIsMultipleInstance) {
|
||||
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
|
||||
$currentDeltegionAllData = AppDelegationPeer::retrieveByPK($currentDelegation['APP_UID'], $currentDelegation['DEL_INDEX']);
|
||||
if ($this->case->multiInstanceIsCompleted($currentDeltegionAllData->getAppUid(),
|
||||
$currentDeltegionAllData->getTasUid(),
|
||||
$currentDeltegionAllData->getDelPrevious()
|
||||
&& preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType()))) {
|
||||
if ($this->case->multiInstanceIsCompleted($appFields['APP_UID'],
|
||||
$appFields['TAS_UID'],
|
||||
$appFields['DEL_PREVIOUS'])
|
||||
&& preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())) {
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user