saving issue with gateway while importing
This commit is contained in:
@@ -3056,8 +3056,8 @@ class Processes {
|
||||
}
|
||||
}
|
||||
else*/
|
||||
if(isset($oData->gateways))
|
||||
$this->createGatewayRows($oData->gateways);
|
||||
/*if(isset($oData->gateways))
|
||||
$this->createGatewayRows($oData->gateways);*/
|
||||
|
||||
$this->createDynaformRows($oData->dynaforms);
|
||||
$this->createInputRows($oData->inputs);
|
||||
|
||||
@@ -166,10 +166,65 @@ class Tasks
|
||||
*/
|
||||
public function createRouteRows( $aRoutes )
|
||||
{
|
||||
$routeID = array();
|
||||
$routeID = array();
|
||||
$taskParallel = '';
|
||||
$taskSecJoin = '';
|
||||
$taskEvaluate = '';
|
||||
$taskParallelEv = '';
|
||||
$taskSelect = '';
|
||||
$taskDiscriminator = '';
|
||||
foreach ( $aRoutes as $key => $row ) {
|
||||
$sRouteType = $row['ROU_TYPE'];
|
||||
$oRoute = new Route();
|
||||
$oProcessMap = new processMap();
|
||||
//unset ($row['ROU_UID']);
|
||||
|
||||
//Saving Gateway into the GATEWAY table
|
||||
$idTask = $row['TAS_UID'];
|
||||
$nextTask = $row['ROU_NEXT_TASK'];
|
||||
if($sRouteType != 'SEQUENTIAL'){
|
||||
switch($sRouteType){
|
||||
case 'PARALLEL':
|
||||
if($idTask != $taskParallel){
|
||||
$taskParallel = $idTask;
|
||||
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
case 'SEC-JOIN':
|
||||
if($nextTask != $taskSecJoin){
|
||||
$taskSecJoin = $nextTask;
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
case 'EVALUATE':
|
||||
if($idTask != $taskEvaluate){
|
||||
$taskEvaluate = $idTask;
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
case 'PARALLEL-BY-EVALUATION':
|
||||
if($idTask != $taskParallelEv){
|
||||
$taskParallelEv = $idTask;
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
case 'SELECT':
|
||||
if($idTask != $taskSelect){
|
||||
$taskSelect = $idTask;
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
case 'DISCRIMINATOR':
|
||||
if($nextTask != $taskDiscriminator){
|
||||
$taskDiscriminator = $nextTask;
|
||||
$sGatewayUID = $oProcessMap->saveNewGateway($row['PRO_UID'], $row['TAS_UID'], $row['ROU_NEXT_TASK']);
|
||||
}
|
||||
break;
|
||||
}
|
||||
$row['GAT_UID'] = $sGatewayUID;
|
||||
}
|
||||
|
||||
if($oRoute->routeExists($row['ROU_UID']))
|
||||
$oRoute->remove($row['ROU_UID']);
|
||||
$routeID[] = $oRoute->create($row);
|
||||
|
||||
@@ -3463,8 +3463,8 @@ class Xpdl extends processes
|
||||
$routeParallel = $sGateUID;
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
$arrayRoutes[$countRoutes]['1']= $taskParallel;
|
||||
@@ -3506,8 +3506,8 @@ class Xpdl extends processes
|
||||
$routeSecJoin = $sGateUID;
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
$arrayRoutes[$countRoutes]['1']= $routeSecJoin;
|
||||
@@ -3550,8 +3550,8 @@ class Xpdl extends processes
|
||||
if($nextTask != "-1"){
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
$arrayRoutes[$countRoutes]['1']= $taskEvaluate;
|
||||
@@ -3599,8 +3599,8 @@ class Xpdl extends processes
|
||||
$routeParallelEv = $sGateUID;
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayInclusive';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
$arrayRoutes[$countRoutes]['1']= $taskParallelEv;
|
||||
@@ -3642,8 +3642,8 @@ class Xpdl extends processes
|
||||
$routeSelect = $sGateUID;
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
$arrayRoutes[$countRoutes]['1']= $taskSelect;
|
||||
@@ -3691,7 +3691,7 @@ class Xpdl extends processes
|
||||
$routeDiscriminator = $sGateUID;
|
||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayComplex';
|
||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
||||
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||
$countG = $countG + 1;
|
||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
foreach($oData->gateways as $id => $value)
|
||||
{
|
||||
if($value['GAT_NEXT_TASK'] != '' && $value['TAS_UID'] != ''){
|
||||
if($value['GAT_NEXT_TASK'] != '' && $value['TAS_UID'] != '' && $value['GAT_TYPE'] != ''){
|
||||
$fields['GATEWAYS'][$countGateway]['0'] = $value['GAT_UID'];
|
||||
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
|
||||
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
|
||||
|
||||
@@ -129,10 +129,9 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
url : 'proxyExtjs?tid='+taskId+'&action=getAssignedSteps'
|
||||
})
|
||||
});
|
||||
//taskUsers.setDefaultSort('LABEL', 'asc');
|
||||
taskSteps.load({params:{start : 0 , limit : 10 }});
|
||||
taskSteps.load({params:{start : 0 , limit : 10 }});
|
||||
|
||||
// create the Data Store of all Steps that are not been assigned to a task i.e available steps
|
||||
// create the Data Store of all Steps that are not been assigned to a task i.e available steps
|
||||
var availableSteps = new Ext.data.JsonStore({
|
||||
root : 'data',
|
||||
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAvailableSteps',
|
||||
@@ -143,6 +142,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
||||
fields : stepsFields
|
||||
|
||||
});
|
||||
availableSteps.load();
|
||||
|
||||
var btnStepsCondition = new Ext.Button({
|
||||
id: 'btnCondition',
|
||||
|
||||
Reference in New Issue
Block a user