MT-63, MT-64, MT-65, MT-66

This commit is contained in:
Gustavo Adolfo Cruz Laura
2016-03-29 18:18:09 -04:00
parent 3633b04e5b
commit a761fe05b3
6 changed files with 27 additions and 2 deletions

View File

@@ -2636,6 +2636,28 @@ class Processes
}
}
/**
* Get Step Rows from a Process
*
* @param $sProUid array.
* @return array $aStep.
*/
public function getStepRowsByElement($sProUid, $element)
{
try {
$elementSteps = array();
$steps = $this->getStepRows($sProUid);
foreach ($steps as $step) {
if ($step['STEP_TYPE_OBJ'] === $element) {
$elementSteps[] = $step;
}
}
return $elementSteps;
} catch (Exception $oError) {
throw ($oError);
}
}
/**
* Create Step Rows from a Process
*

View File

@@ -60,6 +60,7 @@ class DynaformsMigrator implements Importable, Exportable
{
try {
$oData = new \StdClass();
$oData->steps = $this->processes->getStepRowsByElement($prj_uid,'DYNAFORM');
$oData->dynaforms = $this->processes->getDynaformRows($prj_uid);
$result = array(
'workflow-definition' => (array)$oData

View File

@@ -60,6 +60,7 @@ class InputDocumentsMigrator implements Importable, Exportable
{
try {
$oData = new \StdClass();
$oData->steps = $this->processes->getStepRowsByElement($prj_uid,'INPUT_DOCUMENT');
$oData->inputs = $this->processes->getInputRows($prj_uid);
$result = array(

View File

@@ -60,6 +60,7 @@ class OutputDocumentsMigrator implements Importable, Exportable
{
try {
$oData = new \StdClass();
$oData->steps = $this->processes->getStepRowsByElement($prj_uid,'OUTPUT_DOCUMENT');
$oData->outputs = $this->processes->getOutputRows($prj_uid);
$result = array(

View File

@@ -108,8 +108,6 @@ class ProcessDefinitionMigrator implements Importable, Exportable
$oData->routes = $this->processes->getRouteRows($prj_uid);
$oData->lanes = $this->processes->getLaneRows($prj_uid);
$oData->gateways = $this->processes->getGatewayRows($prj_uid);
$oData->steps = $this->processes->getStepRows($prj_uid);
$oData->steptriggers = $this->processes->getStepTriggerRows($oData->tasks);
$oData->subProcess = $this->processes->getSubProcessRow($prj_uid);
$oData->caseTracker = $this->processes->getCaseTrackerRow($prj_uid);
$oData->caseTrackerObject = $this->processes->getCaseTrackerObjectRow($prj_uid);

View File

@@ -62,6 +62,8 @@ class TriggersMigrator implements Importable, Exportable
{
try {
$oData = new \StdClass();
$oData->steptriggers = $this->processes->getStepTriggerRows($oData->tasks);
$oData->triggers = $this->processes->getTriggerRows($prj_uid);
$result = array(