From 21b8072452b45be4f1516696a7f58f572d9bb8dc Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Mon, 2 Mar 2015 17:48:53 -0400 Subject: [PATCH] PM-1700 "Ocurre un error al importar y actualizar un proceso..." SOLVED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: Ocurre un error al importar y actualizar un proceso de tipo bpmn, despliega un error sin descripció el proceso se convierte en un proceso de tipo classic Cause: Mala definicion de variables para el "Add Audit Log" Solution: Se a suprimido las variables, ahora se utiliza el objeto para el seteo de variables --- workflow/engine/classes/model/OutputDocument.php | 10 ++++++---- workflow/engine/classes/model/Triggers.php | 16 ++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/workflow/engine/classes/model/OutputDocument.php b/workflow/engine/classes/model/OutputDocument.php index 7a0e2fd64..9929c2e7c 100755 --- a/workflow/engine/classes/model/OutputDocument.php +++ b/workflow/engine/classes/model/OutputDocument.php @@ -201,7 +201,7 @@ class OutputDocument extends BaseOutputDocument } $description .= ", By clicking on the generated file link: ".$genLink; G::auditLog("CreateOutputDocument", $description); - + return $aData['OUT_DOC_UID']; } else { $sMessage = ''; @@ -329,9 +329,11 @@ class OutputDocument extends BaseOutputDocument Content::removeContent('OUT_DOC_TEMPLATE', '', $oOutputDocument->getOutDocUid()); $iResult = $oOutputDocument->delete(); $oConnection->commit(); - //Add Audit Log - G::auditLog("DeleteOutputDocument", "Output Document Name: ".$outputName.", Output Document Uid: ".$sOutDocUid.", Description: ".$outputDesc.", Filename generated: ".$outputFile); + //Add Audit Log + G::auditLog("DeleteOutputDocument", "Output Document Name: " . $oOutputDocument->getOutDocTitle() . ", Output Document Uid: " . $sOutDocUid . ", Description: " . $oOutputDocument->getOutDocDescription() . ", Filename generated: " . $oOutputDocument->getOutDocFilename()); + + //Return return $iResult; } else { throw (new Exception('This row doesn\'t exist!')); @@ -845,7 +847,7 @@ class OutputDocument extends BaseOutputDocument $sContent = str_ireplace("", "", $sContent); $sContent = str_replace($nrthtml, $nrt, $sContent); - + $sContent = str_replace("margin-left", "text-indent", $sContent); // define Save file diff --git a/workflow/engine/classes/model/Triggers.php b/workflow/engine/classes/model/Triggers.php index 13321d6d0..0f381703c 100755 --- a/workflow/engine/classes/model/Triggers.php +++ b/workflow/engine/classes/model/Triggers.php @@ -189,7 +189,7 @@ class Triggers extends BaseTriggers $description .= ", Description: ".$aData['TRI_DESCRIPTION']; } G::auditLog("CreateTrigger", $description); - + return $result; } else { $con->rollback(); @@ -240,18 +240,14 @@ class Triggers extends BaseTriggers $con->begin(); $oTri = TriggersPeer::retrieveByPK( $TriUid ); if (!is_null($oTri)) { - $triggerName = $this->getTriTitle(); - $triggerDesc = $this->getTriDescription(); - Content::removeContent( 'TRI_TITLE', '', $this->getTriUid()); - Content::removeContent( 'TRI_DESCRIPTION', '', $this->getTriUid()); + Content::removeContent("TRI_TITLE", "", $TriUid); + Content::removeContent("TRI_DESCRIPTION", "", $TriUid); + $result = $oTri->delete(); $con->commit(); + //Add Audit Log - $description = "Trigger Name: ".$triggerName.", Trigger Uid: ".$TriUid; - if (isset ( $triggerDesc )) { - $description .= ", Description: ".$triggerDesc; - } - G::auditLog("DeleteTrigger", $description); + G::auditLog("DeleteTrigger", "Trigger Name: " . $oTri->getTriTitle() . ", Trigger Uid: " . $TriUid . ", Description: " . $oTri->getTriDescription()); } return $result; } catch (Exception $e) {