BUG 8594 "Triggers fired by the routeCase() web service..." SOLVED

- The problem arises when you run the method "routeCase" through web services, in the execution of the triggers can not access variables like @ @ APPLICATION.
- The problem is solved by keeping the variables @ @ APPLICATION and others in the execution of method "derivateCase"
This commit is contained in:
Victor Saisa Lopez
2012-03-09 16:12:30 -04:00
parent 0ef9fd6b9b
commit 509da99a9e
2 changed files with 64 additions and 50 deletions

View File

@@ -1477,17 +1477,19 @@ class wsBase
//$appFields = $oCase->loadCase( $caseId );
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
#@Neyek #############################################################################################
if( !$this->stored_system_variables ) {
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants() );
} else {
$oParams = new stdClass();
$oParams->option = 'STORED SESSION';
$oParams->SID = $this->wsSessionId;
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants($oParams));
//@Neyek #############################################################################################
if (!$this->stored_system_variables) {
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants());
}
#####################################################################################################
else {
$oParams = new stdClass();
$oParams->option = "STORED SESSION";
$oParams->SID = $this->wsSessionId;
$oParams->appData = $appFields["APP_DATA"];
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants($oParams));
}
//####################################################################################################
$oPMScript->setFields( $appFields['APP_DATA'] );
$bExecute = true;
@@ -1518,17 +1520,19 @@ class wsBase
//$appFields = $oCase->loadCase( $caseId );
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
#@Neyek #############################################################################################
if( !$this->stored_system_variables ) {
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants() );
} else {
$oParams = new stdClass();
$oParams->option = 'STORED SESSION';
$oParams->SID = $this->wsSessionId;
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants($oParams));
//@Neyek #############################################################################################
if (!$this->stored_system_variables) {
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants());
}
#####################################################################################################
else {
$oParams = new stdClass();
$oParams->option = "STORED SESSION";
$oParams->SID = $this->wsSessionId;
$oParams->appData = $appFields["APP_DATA"];
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants($oParams));
}
//####################################################################################################
$oPMScript->setFields( $appFields['APP_DATA'] );
$bExecute = true;
@@ -1630,17 +1634,19 @@ class wsBase
$oPMScript = new PMScript();
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
#@Neyek #############################################################################################
if( !$this->stored_system_variables ) {
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants() );
} else {
$oParams = new stdClass();
$oParams->option = 'STORED SESSION';
$oParams->SID = $this->wsSessionId;
$appFields['APP_DATA'] = array_merge ( $appFields['APP_DATA'], G::getSystemConstants($oParams));
//@Neyek #############################################################################################
if (!$this->stored_system_variables) {
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants());
}
#####################################################################################################
else {
$oParams = new stdClass();
$oParams->option = "STORED SESSION";
$oParams->SID = $this->wsSessionId;
$oParams->appData = $appFields["APP_DATA"];
$appFields["APP_DATA"] = array_merge($appFields["APP_DATA"], G::getSystemConstants($oParams));
}
//####################################################################################################
$oPMScript->setFields( $appFields['APP_DATA'] );
$varTriggers .= "<b>-= After Derivation =-</b><br/>";