@@ -182,16 +182,13 @@ class GranularImporter
|
|||||||
* @return bool
|
* @return bool
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function validateImportData($objectList, $generateUid = false)
|
public function validateImportData($objectList)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
|
||||||
if ($generateUid) {
|
$exception = new ImportException();
|
||||||
if (count($objectList) !== count($this->exportObjects->getObjectsList())) {
|
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_INCOMPLETE'));
|
||||||
$exception = new ImportException();
|
throw($exception);
|
||||||
$exception->setNameException(\G::LoadTranslation('ID_PROCESS_DEFINITION_INCOMPLETE'));
|
|
||||||
throw($exception);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ abstract class Importer
|
|||||||
$granularObj = new \ProcessMaker\BusinessModel\Migrator\GranularImporter();
|
$granularObj = new \ProcessMaker\BusinessModel\Migrator\GranularImporter();
|
||||||
$newObjectArray = $objectsToImport;
|
$newObjectArray = $objectsToImport;
|
||||||
$projectUid = $this->importData['tables']['bpmn']["project"][0]["prj_uid"];
|
$projectUid = $this->importData['tables']['bpmn']["project"][0]["prj_uid"];
|
||||||
$processGranulate = $granularObj->validateImportData($objectsToImport, $generateUid);
|
$processGranulate = $granularObj->validateImportData($objectsToImport);
|
||||||
if($generateUid){
|
if($generateUid){
|
||||||
$result = $granularObj->regenerateAllUids($this->importData, $generateUid);
|
$result = $granularObj->regenerateAllUids($this->importData, $generateUid);
|
||||||
$this->importData = $result['data'];
|
$this->importData = $result['data'];
|
||||||
|
|||||||
Reference in New Issue
Block a user