MT-28
This commit is contained in:
@@ -3925,7 +3925,7 @@ class Processes
|
||||
* @param array $arrayData
|
||||
* @throws Exception
|
||||
*/
|
||||
public function updateFilesManager(array $arrayData)
|
||||
public function updateFilesManager($processUid, array $arrayData)
|
||||
{
|
||||
try {
|
||||
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
|
||||
|
||||
@@ -27,7 +27,12 @@ class AssignmentRulesMigrator implements Importable, Exportable
|
||||
// TODO: Implement beforeImport() method.
|
||||
}
|
||||
|
||||
public function import($data)
|
||||
/**
|
||||
* @param $data
|
||||
* @param $replace
|
||||
* @throws ImportException
|
||||
*/
|
||||
public function import($data, $replace)
|
||||
{
|
||||
try {
|
||||
$this->processes->createTaskRows($data);
|
||||
|
||||
@@ -29,13 +29,17 @@ class FilesMigrator implements Importable, Exportable
|
||||
// TODO: Implement beforeImport() method.
|
||||
}
|
||||
|
||||
public function import($data)
|
||||
public function import($data, $replace)
|
||||
{
|
||||
try {
|
||||
$aTable = $data['TABLE'];
|
||||
foreach ($aTable as $value) {
|
||||
if ($value['PRF_EDITABLE'] !== 1) {
|
||||
if ($replace) {
|
||||
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
||||
} else {
|
||||
$this->processes->updateFilesManager($value['PRO_UID'], array($value));
|
||||
}
|
||||
}
|
||||
}
|
||||
$aPath = $data['PATH'];
|
||||
|
||||
@@ -27,14 +27,22 @@ class TemplatesMigrator implements Importable, Exportable
|
||||
// TODO: Implement beforeImport() method.
|
||||
}
|
||||
|
||||
public function import($data)
|
||||
/**
|
||||
* @param $data
|
||||
* @param $replace
|
||||
* @throws ImportException
|
||||
*/
|
||||
public function import($data, $replace)
|
||||
{
|
||||
try {
|
||||
//TABLE
|
||||
$aTable = $data['TABLE'];
|
||||
foreach ($aTable as $value) {
|
||||
if ($value['PRF_EDITABLE'] === 1) {
|
||||
if ($replace) {
|
||||
$this->processes->createFilesManager($value['PRO_UID'], array($value));
|
||||
} else {
|
||||
$this->processes->updateFilesManager($value['PRO_UID'], array($value));
|
||||
}
|
||||
}
|
||||
}
|
||||
$aPath = $data['PATH'];
|
||||
|
||||
@@ -27,10 +27,18 @@ class TriggersMigrator implements Importable, Exportable
|
||||
// TODO: Implement beforeImport() method.
|
||||
}
|
||||
|
||||
public function import($data)
|
||||
/**
|
||||
* @param $data
|
||||
* @param $replace
|
||||
*/
|
||||
public function import($data, $replace)
|
||||
{
|
||||
try {
|
||||
if ($replace) {
|
||||
$this->processes->createTriggerRows($data);
|
||||
} else {
|
||||
$this->processes->updateTriggerRows($data);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
\Logger::log($e->getMessage());
|
||||
throwException(new ImportException($e->getMessage()));
|
||||
|
||||
@@ -29,8 +29,9 @@ class VariablesMigrator implements Importable, Exportable
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports the process variables
|
||||
* @param $data
|
||||
* @param $replace
|
||||
* @throws ImportException
|
||||
*/
|
||||
public function import($data, $replace)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user