BUG 6490: Execute the APP_CACHE_VIEW triggers after we have subprocess data.

When creating a subprocess, a new row is added to the APP_DELEGATION table,
which triggers the insert triggers and updates APP_CACHE_VIEW. However, after
derivating, new data is added to the new case and then the APP_DELEGATION was
not being updated. This fix it by adding one second to the init date so that
an update is forced in APP_DELEGATION which executes the triggers and updates
APP_CACHE_VIEW with the right data.
This commit is contained in:
Alexandre Rosenfeld
2011-03-29 18:30:20 -04:00
parent add67a0fa4
commit c8ed796415

View File

@@ -700,6 +700,10 @@ class Derivation
}
$oSubApplication = new SubApplication();
$oSubApplication->create($aSubApplication);
//Update the AppDelegation to execute the update trigger
$AppDelegation = AppDelegationPeer::retrieveByPK($aNewCase['APPLICATION'], $aNewCase['INDEX']);
$AppDelegation->setDelInitDate("+1 second");
$AppDelegation->save();
//If not is SYNCHRONOUS derivate one more time
if ($aSP['SP_SYNCHRONOUS'] == 0) {
$this->case->setDelInitDate($currentDelegation['APP_UID'], $iNewDelIndex);