Add the definition for alternative cases.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-18 17:56:34 -04:00
parent f73b3d67da
commit 31b116042e
2 changed files with 9 additions and 6 deletions

View File

@@ -32,7 +32,7 @@ class GranularExporter
foreach ($objectList as $data) {
$migrator = $this->factory->create($data);
$migratorData = $migrator->export($this->prjuid);
$this->addData($migratorData);
$this->mergeData($migratorData);
}
return $this->publish();
@@ -49,7 +49,7 @@ class GranularExporter
$data = array();
$data["filename"] = $outputFilename;
$data["version"] = "3.0";
$data["version"] = "3.1";
$data["container"] = "ProcessMaker-Project";
$data["metadata"] = array(
"vendor_version" => \System::getVersion(),
@@ -67,9 +67,9 @@ class GranularExporter
$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()

View File

@@ -31,8 +31,7 @@ class ProcessDefinitionMigrator implements Importable, Exportable
public function import($data)
{
try {
$this->bpmn->createFromStruct($data);
return $result;
return $this->bpmn->createFromStruct($data);;
} catch (\Exception $e) {
return $e->getMessage();
}
@@ -103,6 +102,10 @@ class ProcessDefinitionMigrator implements Importable, Exportable
$oData->groupwfs = $oProcess->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
$result = array(
'' => '',
'' => ''
);
return $oData;
}