@@ -72,6 +72,9 @@ class AssignmentRulesMigrator implements Importable, Exportable
|
|||||||
$oAssignRules = new \StdClass();
|
$oAssignRules = new \StdClass();
|
||||||
$oAssignRulesTasks = $this->processes->getTaskRows($prj_uid);
|
$oAssignRulesTasks = $this->processes->getTaskRows($prj_uid);
|
||||||
$oAssignRules->taskusers = $this->processes->getTaskUserRows($oAssignRulesTasks);
|
$oAssignRules->taskusers = $this->processes->getTaskUserRows($oAssignRulesTasks);
|
||||||
|
//groups - task
|
||||||
|
$oDataTaskUsers = $this->processes->getTaskUserRows($oAssignRulesTasks);
|
||||||
|
$oAssignRules->groupwfs = $this->processes->getGroupwfRows($oDataTaskUsers);
|
||||||
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'workflow-definition' => (array)$oAssignRules
|
'workflow-definition' => (array)$oAssignRules
|
||||||
|
|||||||
@@ -139,11 +139,39 @@ class GranularExporter
|
|||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $migratorData
|
||||||
|
*/
|
||||||
protected function mergeData($migratorData)
|
protected function mergeData($migratorData)
|
||||||
{
|
{
|
||||||
|
$migratorData = $this->verifyConsistenceData($migratorData);
|
||||||
$this->data = array_merge_recursive($this->data, $migratorData);
|
$this->data = array_merge_recursive($this->data, $migratorData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $migratorData
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
protected function verifyConsistenceData($migratorData)
|
||||||
|
{
|
||||||
|
//verifying data consistency group
|
||||||
|
switch (true) {
|
||||||
|
case $migratorData['workflow-definition']['groupwfs']:
|
||||||
|
foreach ($this->data['workflow-definition']['groupwfs'] as $rowGroup) {
|
||||||
|
foreach ($migratorData['workflow-definition']['groupwfs'] as $key => $row) {
|
||||||
|
if ($rowGroup['GRP_UID'] == $row['GRP_UID']) {
|
||||||
|
array_splice($migratorData['workflow-definition']['groupwfs'], $key);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
$migratorData = $migratorData;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $migratorData;
|
||||||
|
}
|
||||||
|
|
||||||
public function publish()
|
public function publish()
|
||||||
{
|
{
|
||||||
return $this->publisher->publish(
|
return $this->publisher->publish(
|
||||||
|
|||||||
@@ -69,8 +69,12 @@ class PermissionsMigrator implements Importable, Exportable
|
|||||||
$processData->groupwfs = $this->processes->getGroupwfRows($processData->taskusers);
|
$processData->groupwfs = $this->processes->getGroupwfRows($processData->taskusers);
|
||||||
$processData->steptriggers = $this->processes->getStepTriggerRows($processData->tasks);
|
$processData->steptriggers = $this->processes->getStepTriggerRows($processData->tasks);
|
||||||
$processData->reportTablesVars = $this->processes->getReportTablesVarsRows($prj_uid);
|
$processData->reportTablesVars = $this->processes->getReportTablesVarsRows($prj_uid);
|
||||||
|
|
||||||
$oData = new \StdClass();
|
$oData = new \StdClass();
|
||||||
$oData->objectPermissions = $this->processes->getObjectPermissionRows($prj_uid, $processData);
|
$oData->objectPermissions = $this->processes->getObjectPermissionRows($prj_uid, $processData);
|
||||||
|
//groups - permissions
|
||||||
|
$oData->groupwfs = $this->processes->getGroupwfRows($oData->objectPermissions);
|
||||||
|
|
||||||
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'workflow-definition' => (array)$oData
|
'workflow-definition' => (array)$oData
|
||||||
|
|||||||
@@ -95,15 +95,10 @@ class ProcessDefinitionMigrator implements Importable, Exportable
|
|||||||
|
|
||||||
$oData = new \StdClass();
|
$oData = new \StdClass();
|
||||||
$oData->tasks = $this->processes->getTaskRows($prj_uid);
|
$oData->tasks = $this->processes->getTaskRows($prj_uid);
|
||||||
|
|
||||||
$oDataTask = new \StdClass();
|
|
||||||
$oDataTask->taskusers = $this->processes->getTaskUserRows($oData->tasks);
|
|
||||||
|
|
||||||
$oData->routes = $this->processes->getRouteRows($prj_uid);
|
$oData->routes = $this->processes->getRouteRows($prj_uid);
|
||||||
$oData->lanes = $this->processes->getLaneRows($prj_uid);
|
$oData->lanes = $this->processes->getLaneRows($prj_uid);
|
||||||
$oData->gateways = $this->processes->getGatewayRows($prj_uid);
|
$oData->gateways = $this->processes->getGatewayRows($prj_uid);
|
||||||
$oData->steps = $this->processes->getStepRows($prj_uid);
|
$oData->steps = $this->processes->getStepRows($prj_uid);
|
||||||
$oData->groupwfs = $this->processes->getGroupwfRows($oDataTask->taskusers);
|
|
||||||
$oData->steptriggers = $this->processes->getStepTriggerRows($oData->tasks);
|
$oData->steptriggers = $this->processes->getStepTriggerRows($oData->tasks);
|
||||||
$oData->subProcess = $this->processes->getSubProcessRow($prj_uid);
|
$oData->subProcess = $this->processes->getSubProcessRow($prj_uid);
|
||||||
$oData->caseTracker = $this->processes->getCaseTrackerRow($prj_uid);
|
$oData->caseTracker = $this->processes->getCaseTrackerRow($prj_uid);
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ class SupervisorsMigrator implements Importable, Exportable
|
|||||||
try {
|
try {
|
||||||
$oData = new \StdClass();
|
$oData = new \StdClass();
|
||||||
$oData->processUser = $this->processes->getProcessUser($prj_uid);
|
$oData->processUser = $this->processes->getProcessUser($prj_uid);
|
||||||
|
//groups - supervisor
|
||||||
|
$oData->groupwfs = $this->processes->getGroupwfRows($oData->processUser);
|
||||||
|
|
||||||
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'workflow-definition' => (array)$oData
|
'workflow-definition' => (array)$oData
|
||||||
|
|||||||
Reference in New Issue
Block a user