PM-1232 "fix. En IE no se visualiza correctamente la importacion de un proceso bpmn" SOLVED
This commit is contained in:
@@ -202,6 +202,18 @@ class Processes
|
|||||||
return $oOutput->outputExists( $sUid );
|
return $oOutput->outputExists( $sUid );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* verify if the object exists
|
||||||
|
*
|
||||||
|
* @param string $sUid
|
||||||
|
* @return boolean
|
||||||
|
*/
|
||||||
|
public function processVariableExists ($sUid = '')
|
||||||
|
{
|
||||||
|
$oProcessVariable = new ProcessVariables();
|
||||||
|
return $oProcessVariable->ProcessVariableExists( $sUid );
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* verify if the object exists
|
* verify if the object exists
|
||||||
*
|
*
|
||||||
@@ -638,6 +650,19 @@ class Processes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get an unused process variables GUID
|
||||||
|
*
|
||||||
|
* @return $sProUid
|
||||||
|
*/
|
||||||
|
public function getUnusedProcessVariableGUID ()
|
||||||
|
{
|
||||||
|
do {
|
||||||
|
$sNewUid = G::generateUniqueID();
|
||||||
|
} while ($this->processVariableExists( $sNewUid ));
|
||||||
|
return $sNewUid;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* change the GUID for a serialized process
|
* change the GUID for a serialized process
|
||||||
*
|
*
|
||||||
@@ -2111,6 +2136,29 @@ class Processes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renew all the unique id for "Process User"
|
||||||
|
*
|
||||||
|
* @param $data Object with the data
|
||||||
|
*
|
||||||
|
* return void
|
||||||
|
*/
|
||||||
|
public function renewAllProcessVariableUid(&$data)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$map = array ();
|
||||||
|
foreach ($data->processVariables as $key => $val) {
|
||||||
|
if (isset( $val['VAR_UID'] )) {
|
||||||
|
$newGuid = $this->getUnusedProcessVariableGUID();
|
||||||
|
$map[$val['VAR_UID']] = $newGuid;
|
||||||
|
$data->processVariables[$key]['VAR_UID'] = $newGuid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Renew the GUID's for all the Uids for all the elements
|
* Renew the GUID's for all the Uids for all the elements
|
||||||
*
|
*
|
||||||
@@ -2140,6 +2188,7 @@ class Processes
|
|||||||
$this->renewAllEvent( $oData );
|
$this->renewAllEvent( $oData );
|
||||||
$this->renewAllCaseScheduler( $oData );
|
$this->renewAllCaseScheduler( $oData );
|
||||||
$this->renewAllProcessUserUid($oData);
|
$this->renewAllProcessUserUid($oData);
|
||||||
|
$this->renewAllProcessVariableUid($oData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
22
workflow/engine/classes/model/ProcessVariables.php
Normal file → Executable file
22
workflow/engine/classes/model/ProcessVariables.php
Normal file → Executable file
@@ -64,4 +64,26 @@ class ProcessVariables extends BaseProcessVariables {
|
|||||||
throw($oError);
|
throw($oError);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* verify if process variable row specified in [sUid] exists.
|
||||||
|
*
|
||||||
|
* @param string $sUid the uid
|
||||||
|
*/
|
||||||
|
public function ProcessVariableExists($sUid)
|
||||||
|
{
|
||||||
|
$con = Propel::getConnection(ProcessVariablesPeer::DATABASE_NAME);
|
||||||
|
|
||||||
|
try {
|
||||||
|
$oObj = ProcessVariablesPeer::retrieveByPk($sUid);
|
||||||
|
|
||||||
|
if (is_object($oObj) && get_class($oObj) == 'ProcessVariables') {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} catch (Exception $oError) {
|
||||||
|
throw ($oError);
|
||||||
|
}
|
||||||
|
}
|
||||||
} // ProcessVariables
|
} // ProcessVariables
|
||||||
|
|||||||
Reference in New Issue
Block a user