PM-3842: (Para Desktop) 0018471: Los triggers asignados antes del segundo step no se ejecutan cuando se salta el primer step, pero si se salta el segundo step

This commit is contained in:
marcelo.cuiza
2015-10-20 11:19:49 -04:00
parent 332dc92346
commit c657c8af9f

View File

@@ -106,6 +106,7 @@ $oHeadPublisher->addScriptCode( '
$G_PUBLISH->AddContent( 'template', '', '', '', $oTemplatePower );
$oCase = new Cases();
$oStep = new Step();
$Fields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$Fields['APP_DATA'] = array_merge( $Fields['APP_DATA'], G::getSystemConstants() );
@@ -159,8 +160,11 @@ if ($flagExecuteBeforeTriggers) {
if (! isset( $_SESSION['_NO_EXECUTE_TRIGGERS_'] )) {
//Execute before triggers - Start
if (!isset($_SESSION['beforeTriggersExecuted'])) {
$Fields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA'] );
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'] );
}
} else {
unset($_SESSION['beforeTriggersExecuted']);
}
@@ -265,7 +269,6 @@ try {
}" );
}
$oStep = new Step();
$oStep = $oStep->loadByProcessTaskPosition( $_SESSION['PROCESS'], $_SESSION['TASK'], $_GET['POSITION'] );
/**