worked on saving routes (while going reverse, adding route from down to up)
This commit is contained in:
@@ -92,7 +92,7 @@ switch ($aData['action']) {
|
|||||||
foreach ($aData['ROU_NEXT_TASK'] as $iKey => $aRow)
|
foreach ($aData['ROU_NEXT_TASK'] as $iKey => $aRow)
|
||||||
{
|
{
|
||||||
$aFields['PRO_UID'] = $aData['PROCESS'];
|
$aFields['PRO_UID'] = $aData['PROCESS'];
|
||||||
$aFields['TAS_UID'] = $aData['TASK'];
|
$aFields['TAS_UID'] = $aData['TASK'][0];
|
||||||
$aFields['ROU_NEXT_TASK'] = $aRow;
|
$aFields['ROU_NEXT_TASK'] = $aRow;
|
||||||
$aFields['ROU_CASE'] = $iKey;
|
$aFields['ROU_CASE'] = $iKey;
|
||||||
$aFields['ROU_TYPE'] = $aData['ROU_TYPE'];
|
$aFields['ROU_TYPE'] = $aData['ROU_TYPE'];
|
||||||
|
|||||||
@@ -1860,7 +1860,7 @@ MyWorkflow.prototype.saveEvents = function(oEvent,sTaskUID)
|
|||||||
if(response.responseText != '')
|
if(response.responseText != '')
|
||||||
{
|
{
|
||||||
//Save Route
|
//Save Route
|
||||||
if(workflow.currentSelection.type == 'bpmnEventTimerInter'){
|
if(workflow.currentSelection.type.match(/Inter/) && workflow.currentSelection.type.match(/Event/)){
|
||||||
workflow.currentSelection.id = response.responseText;
|
workflow.currentSelection.id = response.responseText;
|
||||||
var newObj = workflow.currentSelection;
|
var newObj = workflow.currentSelection;
|
||||||
var preObj = new Array();
|
var preObj = new Array();
|
||||||
@@ -1885,7 +1885,7 @@ MyWorkflow.prototype.saveEvents = function(oEvent,sTaskUID)
|
|||||||
* @Param newObj Object
|
* @Param newObj Object
|
||||||
* @Author Girish joshi
|
* @Author Girish joshi
|
||||||
*/
|
*/
|
||||||
MyWorkflow.prototype.saveRoute = function(preObj,newObj)
|
MyWorkflow.prototype.saveRoute = function(preObj,newObj)
|
||||||
{
|
{
|
||||||
var pro_uid = this.getUrlVars();
|
var pro_uid = this.getUrlVars();
|
||||||
|
|
||||||
@@ -2265,4 +2265,4 @@ MyWorkflow.prototype.zoom = function(sType)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ InputPort.prototype.onDrop = function (port) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.parentNode.id == port.parentNode.id) {} else {
|
if (this.parentNode.id == port.parentNode.id) {} else {
|
||||||
var newObj = new Array();
|
/*var newObj = new Array();
|
||||||
newObj = this.workflow.currentSelection;
|
newObj = this.workflow.currentSelection;
|
||||||
var preObj = port.parentNode;
|
var preObj = port.parentNode;
|
||||||
newObj.sPortType =port.properties.name;
|
newObj.sPortType =port.properties.name;
|
||||||
@@ -284,7 +284,62 @@ InputPort.prototype.onDrop = function (port) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
_3f02.setConnection(new DecoratedConnection());
|
_3f02.setConnection(new DecoratedConnection());
|
||||||
this.parentNode.workflow.getCommandStack().execute(_3f02);
|
this.parentNode.workflow.getCommandStack().execute(_3f02);*/
|
||||||
|
var _4070 = new CommandConnect(this.parentNode.workflow, port, this);
|
||||||
|
if (_4070.source.type == _4070.target.type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
_4070.setConnection(new DecoratedConnection());
|
||||||
|
this.parentNode.workflow.getCommandStack().execute(_4070);
|
||||||
|
|
||||||
|
//Saving Start Event
|
||||||
|
var preObj = new Array();
|
||||||
|
var bpmnType = this.workflow.currentSelection.type;
|
||||||
|
if(bpmnType.match(/Event/) && bpmnType.match(/Start/) && port.parentNode.type.match(/Task/))
|
||||||
|
{
|
||||||
|
var tas_uid = port.parentNode.id;
|
||||||
|
this.workflow.saveEvents(this.workflow.currentSelection,tas_uid);
|
||||||
|
}
|
||||||
|
else if(bpmnType.match(/End/) && bpmnType.match(/Event/) && port.parentNode.type.match(/Task/))
|
||||||
|
{
|
||||||
|
preObj = this.workflow.currentSelection;
|
||||||
|
var newObj = port.parentNode;
|
||||||
|
newObj.conn = _4070.connection;
|
||||||
|
this.workflow.saveRoute(preObj,newObj);
|
||||||
|
}
|
||||||
|
else if(port.parentNode.type.match(/Task/) && bpmnType.match(/Inter/) && bpmnType.match(/Event/))
|
||||||
|
{
|
||||||
|
var taskFrom = workflow.getStartEventConn(this,'sourcePort','InputPort');
|
||||||
|
var taskTo = workflow.getStartEventConn(this,'targetPort','OutputPort');
|
||||||
|
|
||||||
|
if(typeof taskFrom[0] != 'undefined' || typeof taskTo[0] != 'undefined')
|
||||||
|
{
|
||||||
|
preObj.type = 'Task';
|
||||||
|
preObj.taskFrom = taskFrom[0].value;
|
||||||
|
preObj.taskTo = taskTo[0].value;
|
||||||
|
|
||||||
|
//save Event First
|
||||||
|
tas_uid = port.parentNode.id;
|
||||||
|
this.workflow.saveEvents(workflow.currentSelection,preObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(bpmnType.match(/Task/) && port.parentNode.type.match(/Task/))
|
||||||
|
{
|
||||||
|
|
||||||
|
preObj = this.workflow.currentSelection;
|
||||||
|
newObj = port.parentNode;
|
||||||
|
newObj.conn = _4070.connection;
|
||||||
|
newObj.sPortType =port.properties.name;
|
||||||
|
preObj.sPortType =this.properties.name;
|
||||||
|
this.workflow.saveRoute(preObj,newObj);
|
||||||
|
}
|
||||||
|
else if(bpmnType.match(/Gateway/) && port.parentNode.type.match(/Task/))
|
||||||
|
{
|
||||||
|
var shape = new Array();
|
||||||
|
shape.type = '';
|
||||||
|
preObj = this.workflow.currentSelection;
|
||||||
|
this.workflow.saveRoute(preObj,shape);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -338,15 +393,15 @@ OutputPort.prototype.onDrop = function (port) {
|
|||||||
preObj.taskTo = taskTo[0].value;
|
preObj.taskTo = taskTo[0].value;
|
||||||
|
|
||||||
//save Event First
|
//save Event First
|
||||||
var tas_uid = port.parentNode.id;
|
tas_uid = port.parentNode.id;
|
||||||
this.workflow.saveEvents(workflow.currentSelection,preObj);
|
this.workflow.saveEvents(workflow.currentSelection,preObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(bpmnType.match(/Task/) && port.parentNode.type.match(/Task/))
|
else if(bpmnType.match(/Task/) && port.parentNode.type.match(/Task/))
|
||||||
{
|
{
|
||||||
|
|
||||||
var preObj = this.workflow.currentSelection;
|
preObj = this.workflow.currentSelection;
|
||||||
var newObj = port.parentNode;
|
newObj = port.parentNode;
|
||||||
newObj.conn = _4070.connection;
|
newObj.conn = _4070.connection;
|
||||||
newObj.sPortType =port.properties.name;
|
newObj.sPortType =port.properties.name;
|
||||||
preObj.sPortType =this.properties.name;
|
preObj.sPortType =this.properties.name;
|
||||||
@@ -356,7 +411,7 @@ OutputPort.prototype.onDrop = function (port) {
|
|||||||
{
|
{
|
||||||
var shape = new Array();
|
var shape = new Array();
|
||||||
shape.type = '';
|
shape.type = '';
|
||||||
var preObj = this.workflow.currentSelection;
|
preObj = this.workflow.currentSelection;
|
||||||
this.workflow.saveRoute(preObj,shape);
|
this.workflow.saveRoute(preObj,shape);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user