@@ -161,6 +161,7 @@ class GranularImporter
|
|||||||
public function import($objectList)
|
public function import($objectList)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$objectList = $this->reorderImportOrder($objectList);
|
||||||
foreach ($objectList as $data) {
|
foreach ($objectList as $data) {
|
||||||
$objClass = $this->factory->create($data['name']);
|
$objClass = $this->factory->create($data['name']);
|
||||||
if (is_object($objClass)) {
|
if (is_object($objClass)) {
|
||||||
@@ -199,6 +200,39 @@ class GranularImporter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* It's very important to import the elements in the right order, if not
|
||||||
|
* chaos will be unleashed, God forgive us all.
|
||||||
|
* @param $objectList
|
||||||
|
*/
|
||||||
|
public function reorderImportOrder($objectList)
|
||||||
|
{
|
||||||
|
$arrangeList = array(
|
||||||
|
0 => 12,
|
||||||
|
1 => 13,
|
||||||
|
2 => 0,
|
||||||
|
3 => 1,
|
||||||
|
4 => 2,
|
||||||
|
5 => 3,
|
||||||
|
6 => 4,
|
||||||
|
7 => 5,
|
||||||
|
8 => 6,
|
||||||
|
9 => 7,
|
||||||
|
10 => 8,
|
||||||
|
11 => 9,
|
||||||
|
12 => 10,
|
||||||
|
13 => 11
|
||||||
|
);
|
||||||
|
$orderedList = array();
|
||||||
|
foreach ($arrangeList as $objectOrder => $executionOrder) {
|
||||||
|
if (!empty($objectList[$objectOrder])) {
|
||||||
|
$orderedList[$executionOrder] = $objectList[$objectOrder];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ksort($orderedList);
|
||||||
|
return $orderedList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $objectList
|
* @param $objectList
|
||||||
* @param array $data
|
* @param array $data
|
||||||
|
|||||||
@@ -123,6 +123,7 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
|||||||
$oData->messageType = $this->processes->getMessageTypes($prj_uid);
|
$oData->messageType = $this->processes->getMessageTypes($prj_uid);
|
||||||
$oData->messageTypeVariable = $this->processes->getMessageTypeVariables($prj_uid);
|
$oData->messageTypeVariable = $this->processes->getMessageTypeVariables($prj_uid);
|
||||||
$oData->messageEventDefinition = $this->processes->getMessageEventDefinitions($prj_uid);
|
$oData->messageEventDefinition = $this->processes->getMessageEventDefinitions($prj_uid);
|
||||||
|
$oData->steps = $this->processes->getStepRows($prj_uid);
|
||||||
$oData->scriptTask = $this->processes->getScriptTasks($prj_uid);
|
$oData->scriptTask = $this->processes->getScriptTasks($prj_uid);
|
||||||
$oData->timerEvent = $this->processes->getTimerEvents($prj_uid);
|
$oData->timerEvent = $this->processes->getTimerEvents($prj_uid);
|
||||||
$oData->emailEvent = $this->processes->getEmailEvent($prj_uid);
|
$oData->emailEvent = $this->processes->getEmailEvent($prj_uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user