MT-103
This commit is contained in:
@@ -36,6 +36,19 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
try {
|
||||
//Bpmn elements
|
||||
$pjrUid =$this->bpmn->createFromStruct($data['bpmn'], false);
|
||||
//Import workflow elements
|
||||
$this->afterImport($data);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$exception = new ImportException($e->getMessage());
|
||||
$exception->setNameException($this->className);
|
||||
throw($exception);
|
||||
}
|
||||
}
|
||||
|
||||
public function afterImport($data)
|
||||
{
|
||||
try {
|
||||
//Workflow elements
|
||||
$this->processes->createTaskRows($data['workflow']['tasks']);
|
||||
$this->processes->createTaskUserRows($data['workflow']['taskusers']);
|
||||
@@ -70,11 +83,6 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
||||
}
|
||||
}
|
||||
|
||||
public function afterImport($data)
|
||||
{
|
||||
// TODO: Implement afterImport() method.
|
||||
}
|
||||
|
||||
public function beforeExport()
|
||||
{
|
||||
// TODO: Implement beforeExport() method.
|
||||
|
||||
@@ -253,6 +253,10 @@ abstract class Importer
|
||||
$granularObj->import($objectList);
|
||||
}
|
||||
}
|
||||
if($option === self::IMPORT_OPTION_CREATE_NEW || $option === self::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW){
|
||||
$oProcessDef = new \ProcessMaker\BusinessModel\Migrator\ProcessDefinitionMigrator();
|
||||
$oProcessDef->afterImport($this->importData['tables']);
|
||||
}
|
||||
|
||||
return $projectUid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user