Add the definition for alternative cases.
This commit is contained in:
@@ -32,7 +32,7 @@ class GranularExporter
|
|||||||
foreach ($objectList as $data) {
|
foreach ($objectList as $data) {
|
||||||
$migrator = $this->factory->create($data);
|
$migrator = $this->factory->create($data);
|
||||||
$migratorData = $migrator->export($this->prjuid);
|
$migratorData = $migrator->export($this->prjuid);
|
||||||
$this->addData($migratorData);
|
$this->mergeData($migratorData);
|
||||||
}
|
}
|
||||||
return $this->publish();
|
return $this->publish();
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ class GranularExporter
|
|||||||
|
|
||||||
$data = array();
|
$data = array();
|
||||||
$data["filename"] = $outputFilename;
|
$data["filename"] = $outputFilename;
|
||||||
$data["version"] = "3.0";
|
$data["version"] = "3.1";
|
||||||
$data["container"] = "ProcessMaker-Project";
|
$data["container"] = "ProcessMaker-Project";
|
||||||
$data["metadata"] = array(
|
$data["metadata"] = array(
|
||||||
"vendor_version" => \System::getVersion(),
|
"vendor_version" => \System::getVersion(),
|
||||||
@@ -67,9 +67,9 @@ class GranularExporter
|
|||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addData($migratorData)
|
protected function mergeData($migratorData)
|
||||||
{
|
{
|
||||||
//$this->data = $data;
|
$this->data(array_merge_recursive($this->data, $migratorData));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function publish()
|
public function publish()
|
||||||
|
|||||||
@@ -31,8 +31,7 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
|||||||
public function import($data)
|
public function import($data)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->bpmn->createFromStruct($data);
|
return $this->bpmn->createFromStruct($data);;
|
||||||
return $result;
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
return $e->getMessage();
|
return $e->getMessage();
|
||||||
}
|
}
|
||||||
@@ -103,6 +102,10 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
|||||||
$oData->groupwfs = $oProcess->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
|
$oData->groupwfs = $oProcess->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
|
||||||
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
|
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
|
||||||
|
|
||||||
|
$result = array(
|
||||||
|
'' => '',
|
||||||
|
'' => ''
|
||||||
|
);
|
||||||
return $oData;
|
return $oData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user