PM-3912 Los triggers Before Assignment se ejecutan aun cuando no se cumplan las condiciones

This commit is contained in:
Ronald Quenta
2015-11-04 11:47:56 -04:00
parent 29582243fb
commit 1a356cc562
2 changed files with 6 additions and 9 deletions

View File

@@ -160,11 +160,8 @@ if ($flagExecuteBeforeTriggers) {
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
//Execute before triggers - Start
if (!isset($_SESSION['beforeTriggersExecuted']) || $_GET['POSITION'] > 1) {
$oStep = $oStep->loadByProcessTaskPosition( $_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION'] );
if($oStep) {
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $oStep->getStepTypeObj(), $oStep->getStepUidObj(), 'BEFORE', $Fields['APP_DATA'] );
}
if (!isset($_SESSION['beforeTriggersExecuted']) || $triggers) {
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
} else {
unset($_SESSION['beforeTriggersExecuted']);
}