diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php index d256a4286..0f71e166d 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/Migrator/GranularImporter.php @@ -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) { diff --git a/workflow/engine/templates/processes/main.js b/workflow/engine/templates/processes/main.js index 7537024d7..437d6494a 100755 --- a/workflow/engine/templates/processes/main.js +++ b/workflow/engine/templates/processes/main.js @@ -8,6 +8,9 @@ var processesGrid, winDesigner, newTypeProcess, affectedGroups, + exportButton, + exportMenu, + exportComponent, processObjectsArray; /** @@ -23,6 +26,56 @@ importProcessGlobal.isGranularImport = false; importProcessGlobal.objectGranularImport; importProcessGlobal.objectsToImport = []; +exportButton = { + id: "export", + disabled: true, + text: _("ID_EXPORT"), + iconCls: "silk-add", + icon: "/images/export.png", + handler: function () { + exportProcess(); + } +}; +/*----------------------------------********---------------------------------*/ +/**Begin enterprise export component**/ +exportMenu = { + xtype: "tbsplit", + id: "export", + disabled: true, + text: _("ID_EXPORT"), + iconCls: "silk-add", + icon: "/images/export.png", + menu: [ + { + text: _("ID_NORMAL_EXPORT"), + iconCls: "silk-add", + icon: "", + handler: function () + { + exportProcess(); + } + }, { + text: _("ID_GRANULAR_EXPORT"), + iconCls: "silk-add", + icon: "", + handler: function () + { + exportImportProcessObjects('export'); + } + } + ] +}; +/**End enterprise export component**/ +/*----------------------------------********---------------------------------*/ + +exportComponent = exportButton; + +/*----------------------------------********---------------------------------*/ +/**Begin enterprise component assignment**/ +exportComponent = exportMenu; +/**End enterprise component assignment**/ +/*----------------------------------********---------------------------------*/ + new Ext.KeyMap(document, { key: Ext.EventObject.F5, fn: function(keycode, e) { @@ -355,33 +408,9 @@ Ext.onReady(function(){ handler:deleteProcess },{ xtype: 'tbseparator' - },{ - xtype: "tbsplit", - id: "export", - disabled: true, - text: _("ID_EXPORT"), - iconCls: "silk-add", - icon: "/images/export.png", - menu: [ - { - text: _("ID_NORMAL_EXPORT"), - iconCls: "silk-add", - icon: "", - handler: function () - { - exportProcess(); - } - }, { - text: _("ID_GRANULAR_EXPORT"), - iconCls: "silk-add", - icon: "", - handler: function () - { - exportImportProcessObjects('export'); - } - } - ] - },{ + }, + exportComponent + ,{ text: _('ID_IMPORT'), iconCls: 'silk-add', icon: '/images/import.gif',