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