This commit is contained in:
Paula V. Quispe
2015-11-24 11:54:28 -04:00
parent de8c0755c7
commit afff0d4c47

View File

@@ -729,7 +729,7 @@ class Derivation
$elementDestType $elementDestType
); );
if($elementDestUid == "-1"){ if($elementDestUid == "-1" || count($arrayElement) == 0){
$arrayElement = $this->throwElementToEnd($elementOriginUid, $rouCondition); $arrayElement = $this->throwElementToEnd($elementOriginUid, $rouCondition);
} }
@@ -1063,9 +1063,18 @@ class Derivation
$this->case->closeAllDelegations( $currentDelegation['APP_UID'] ); $this->case->closeAllDelegations( $currentDelegation['APP_UID'] );
$this->case->closeAllThreads( $currentDelegation['APP_UID'] ); $this->case->closeAllThreads( $currentDelegation['APP_UID'] );
//I think we need to change the APP_STATUS to completed, //I think we need to change the APP_STATUS to completed,
if (isset($nextDel["TAS_UID_DUMMY"]) ) {
//BpmnEvent $taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
$this->throwEventsBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields, $flagFirstIteration, true, $nextDel['ROU_CONDITION']); if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())) {
//Throw Events
$this->throwEventsBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
} else {
$this->throwEventsBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields, $flagFirstIteration, true, $nextDel['ROU_CONDITION']);
}
} else {
//BpmnEvent
$this->throwEventsBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields, $flagFirstIteration, true, $nextDel['ROU_CONDITION']);
}
break; break;
case TASK_FINISH_TASK: case TASK_FINISH_TASK:
$iAppThreadIndex = $appFields['DEL_THREAD']; $iAppThreadIndex = $appFields['DEL_THREAD'];