Merged in darojas/processmaker/PM--978 (pull request #1371)

PM-978 "FIX notice new issues(webentry, variables). Complete Extended XML bpmn schema to add running artifacts in file .pmx" SOLVED
This commit is contained in:
Julio Cesar Laura Avendaño
2015-02-04 08:37:30 -04:00
2 changed files with 17 additions and 14 deletions

View File

@@ -2197,12 +2197,14 @@ class Processes
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;
if (isset($data->processVariables)) {
$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;
}
}
}

17
workflow/engine/src/ProcessMaker/Project/Workflow.php Normal file → Executable file
View File

@@ -1153,19 +1153,20 @@ class Workflow extends Handler
}
//Update WEB_ENTRY_EVENT.EVN_UID
foreach ($arrayWorkflowData["webEntryEvent"] as $key => $value) {
$webEntryEventEventUid = $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"];
if (isset($arrayWorkflowData["webEntryEvent"])) {
foreach ($arrayWorkflowData["webEntryEvent"] as $key => $value) {
$webEntryEventEventUid = $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"];
foreach ($arrayUid as $value2) {
$arrayItem = $value2;
foreach ($arrayUid as $value2) {
$arrayItem = $value2;
if ($arrayItem["old_uid"] == $webEntryEventEventUid) {
$arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"];
break;
if ($arrayItem["old_uid"] == $webEntryEventEventUid) {
$arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"];
break;
}
}
}
}
//Workflow tables
$workflowData = (object)($arrayWorkflowData);