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 );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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
|
||||
*
|
||||
@@ -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
|
||||
*
|
||||
@@ -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
|
||||
*
|
||||
@@ -2140,6 +2188,7 @@ class Processes
|
||||
$this->renewAllEvent( $oData );
|
||||
$this->renewAllCaseScheduler( $oData );
|
||||
$this->renewAllProcessUserUid($oData);
|
||||
$this->renewAllProcessVariableUid($oData);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user