saving issue with gateway while importing
This commit is contained in:
@@ -3056,8 +3056,8 @@ class Processes {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else*/
|
else*/
|
||||||
if(isset($oData->gateways))
|
/*if(isset($oData->gateways))
|
||||||
$this->createGatewayRows($oData->gateways);
|
$this->createGatewayRows($oData->gateways);*/
|
||||||
|
|
||||||
$this->createDynaformRows($oData->dynaforms);
|
$this->createDynaformRows($oData->dynaforms);
|
||||||
$this->createInputRows($oData->inputs);
|
$this->createInputRows($oData->inputs);
|
||||||
|
|||||||
@@ -166,10 +166,65 @@ class Tasks
|
|||||||
*/
|
*/
|
||||||
public function createRouteRows( $aRoutes )
|
public function createRouteRows( $aRoutes )
|
||||||
{
|
{
|
||||||
$routeID = array();
|
$routeID = array();
|
||||||
|
$taskParallel = '';
|
||||||
|
$taskSecJoin = '';
|
||||||
|
$taskEvaluate = '';
|
||||||
|
$taskParallelEv = '';
|
||||||
|
$taskSelect = '';
|
||||||
|
$taskDiscriminator = '';
|
||||||
foreach ( $aRoutes as $key => $row ) {
|
foreach ( $aRoutes as $key => $row ) {
|
||||||
|
$sRouteType = $row['ROU_TYPE'];
|
||||||
$oRoute = new Route();
|
$oRoute = new Route();
|
||||||
|
$oProcessMap = new processMap();
|
||||||
//unset ($row['ROU_UID']);
|
//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']))
|
if($oRoute->routeExists($row['ROU_UID']))
|
||||||
$oRoute->remove($row['ROU_UID']);
|
$oRoute->remove($row['ROU_UID']);
|
||||||
$routeID[] = $oRoute->create($row);
|
$routeID[] = $oRoute->create($row);
|
||||||
|
|||||||
@@ -3463,8 +3463,8 @@ class Xpdl extends processes
|
|||||||
$routeParallel = $sGateUID;
|
$routeParallel = $sGateUID;
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
$arrayRoutes[$countRoutes]['1']= $taskParallel;
|
$arrayRoutes[$countRoutes]['1']= $taskParallel;
|
||||||
@@ -3506,8 +3506,8 @@ class Xpdl extends processes
|
|||||||
$routeSecJoin = $sGateUID;
|
$routeSecJoin = $sGateUID;
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayParallel';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
$arrayRoutes[$countRoutes]['1']= $routeSecJoin;
|
$arrayRoutes[$countRoutes]['1']= $routeSecJoin;
|
||||||
@@ -3550,8 +3550,8 @@ class Xpdl extends processes
|
|||||||
if($nextTask != "-1"){
|
if($nextTask != "-1"){
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
$arrayRoutes[$countRoutes]['1']= $taskEvaluate;
|
$arrayRoutes[$countRoutes]['1']= $taskEvaluate;
|
||||||
@@ -3599,8 +3599,8 @@ class Xpdl extends processes
|
|||||||
$routeParallelEv = $sGateUID;
|
$routeParallelEv = $sGateUID;
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayInclusive';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayInclusive';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
$arrayRoutes[$countRoutes]['1']= $taskParallelEv;
|
$arrayRoutes[$countRoutes]['1']= $taskParallelEv;
|
||||||
@@ -3642,8 +3642,8 @@ class Xpdl extends processes
|
|||||||
$routeSelect = $sGateUID;
|
$routeSelect = $sGateUID;
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayExclusiveData';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $coordinateY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
$arrayRoutes[$countRoutes]['1']= $taskSelect;
|
$arrayRoutes[$countRoutes]['1']= $taskSelect;
|
||||||
@@ -3691,7 +3691,7 @@ class Xpdl extends processes
|
|||||||
$routeDiscriminator = $sGateUID;
|
$routeDiscriminator = $sGateUID;
|
||||||
$arrayGateways[$countG]['0'] = $sGateUID;
|
$arrayGateways[$countG]['0'] = $sGateUID;
|
||||||
$arrayGateways[$countG]['1'] = 'bpmnGatewayComplex';
|
$arrayGateways[$countG]['1'] = 'bpmnGatewayComplex';
|
||||||
$arrayGateways[$countG]['2'] = $coordinateX;
|
$arrayGateways[$countG]['2'] = $gatPosX;
|
||||||
$arrayGateways[$countG]['3'] = $gatPosY;
|
$arrayGateways[$countG]['3'] = $gatPosY;
|
||||||
$countG = $countG + 1;
|
$countG = $countG + 1;
|
||||||
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
$arrayRoutes[$countRoutes]['0']= G::generateUniqueID();
|
||||||
|
|||||||
@@ -173,7 +173,7 @@
|
|||||||
|
|
||||||
foreach($oData->gateways as $id => $value)
|
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]['0'] = $value['GAT_UID'];
|
||||||
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
|
$fields['GATEWAYS'][$countGateway]['1'] = $value['GAT_TYPE'];
|
||||||
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
|
$fields['GATEWAYS'][$countGateway]['2'] = $value['GAT_X'];
|
||||||
|
|||||||
@@ -129,10 +129,9 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
|||||||
url : 'proxyExtjs?tid='+taskId+'&action=getAssignedSteps'
|
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({
|
var availableSteps = new Ext.data.JsonStore({
|
||||||
root : 'data',
|
root : 'data',
|
||||||
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAvailableSteps',
|
url : 'proxyExtjs?pid='+pro_uid+'&tid='+taskId+'&action=getAvailableSteps',
|
||||||
@@ -143,6 +142,7 @@ TaskContext.prototype.editTaskSteps = function(_3252){
|
|||||||
fields : stepsFields
|
fields : stepsFields
|
||||||
|
|
||||||
});
|
});
|
||||||
|
availableSteps.load();
|
||||||
|
|
||||||
var btnStepsCondition = new Ext.Button({
|
var btnStepsCondition = new Ext.Button({
|
||||||
id: 'btnCondition',
|
id: 'btnCondition',
|
||||||
|
|||||||
Reference in New Issue
Block a user