Merge remote-tracking branch 'origin/feature/HOR-3274' into feature/HOR-3559

This commit is contained in:
davidcallizaya
2017-08-10 21:38:58 -04:00
44 changed files with 60980 additions and 710 deletions

View File

@@ -850,6 +850,29 @@ class Processes
return true;
}
/**
* change and Renew all Task GUID owned by WebEntries
*
* @param string $oData
* @return boolean
*/
public function renewAllWebEntryEventGuid(&$oData)
{
$map = array();
foreach ($oData->webEntryEvent as $key => $val) {
if (isset($val["EVN_UID_OLD"])) {
$uidNew = \ProcessMaker\BusinessModel\WebEntryEvent::getTaskUidFromEvnUid($val["EVN_UID"]);
$uidOld = \ProcessMaker\BusinessModel\WebEntryEvent::getTaskUidFromEvnUid($val["EVN_UID_OLD"]);
foreach($oData->tasks as $index => $task) {
if ($task["TAS_UID"]===$uidOld) {
$oData->tasks[$index]["TAS_UID"]=$uidNew;
$oData->tasks[$index]["TAS_UID_OLD"]=$uidOld;
}
}
}
}
}
/**
* change and Renew all Task GUID, because the process needs to have a new set of tasks
*
@@ -2584,6 +2607,7 @@ class Processes
$oData->uid["PROCESS"] = array($oData->process["PRO_PARENT"] => $oData->process["PRO_UID"]);
}
$this->renewAllWebEntryEventGuid($oData);
$this->renewAllTaskGuid($oData);
$this->renewAllDynaformGuid($oData);
$this->renewAllInputGuid($oData);