1.) Fixed link(route) between two already created task......

This commit is contained in:
girish
2011-01-28 13:42:06 +00:00
parent 4a95bc00a4
commit a31078418c
2 changed files with 13 additions and 14 deletions

View File

@@ -1,13 +1,13 @@
bpmnTask = function () { bpmnTask = function (_30ab) {
VectorFigure.call(this); VectorFigure.call(this);
if(typeof workflow.boundaryEvent != 'undefined' && workflow.boundaryEvent == true) if(typeof _30ab.boundaryEvent != 'undefined' && _30ab.boundaryEvent == true)
{ {
this.boundaryEvent = workflow.boundaryEvent; this.boundaryEvent = _30ab.boundaryEvent;
} }
//Getting width and height from DB //Getting width and height from DB
if(typeof workflow.task_width != 'undefined' && typeof workflow.task_height != 'undefined') if(typeof _30ab.task_width != 'undefined' && typeof _30ab.task_height != 'undefined')
this.setDimension(workflow.task_width, workflow.task_height); this.setDimension(_30ab.task_width, _30ab.task_height);
else else
this.setDimension(165, 40); this.setDimension(165, 40);
@@ -16,7 +16,7 @@ bpmnTask = function () {
this.setDimension(workflow.zoomTaskWidth, workflow.zoomTaskHeight); this.setDimension(workflow.zoomTaskWidth, workflow.zoomTaskHeight);
this.taskName = workflow.taskName; //It will set the Default Task Name with appropriate count While dragging a task on the canvas this.taskName = _30ab.taskName; //It will set the Default Task Name with appropriate count While dragging a task on the canvas
}; };
bpmnTask.prototype = new VectorFigure; bpmnTask.prototype = new VectorFigure;
@@ -245,9 +245,9 @@ this.workflow.onKeyDown(_3e0e,ctrl);
} }
}; };
bpmnTask.prototype.setWorkflow = function () { bpmnTask.prototype.setWorkflow = function (_40c5) {
VectorFigure.prototype.setWorkflow.call(this, workflow); VectorFigure.prototype.setWorkflow.call(this, _40c5);
if (workflow != null) { if (_40c5 != null) {
/*Adding Port to the Task After dragging Task on the Canvas /*Adding Port to the Task After dragging Task on the Canvas
*Ports will be invisibe After Drag and Drop, But It will be created *Ports will be invisibe After Drag and Drop, But It will be created
*/ */
@@ -258,7 +258,7 @@ bpmnTask.prototype.setWorkflow = function () {
for (var i = 0; i < TaskPortName.length; i++) { for (var i = 0; i < TaskPortName.length; i++) {
eval('this.' + TaskPortName[i] + ' = new ' + TaskPortType[i] + '()'); //Create New Port eval('this.' + TaskPortName[i] + ' = new ' + TaskPortType[i] + '()'); //Create New Port
eval('this.' + TaskPortName[i] + '.setWorkflow()'); //Add port to the workflow eval('this.' + TaskPortName[i] + '.setWorkflow(_40c5)'); //Add port to the workflow
eval('this.' + TaskPortName[i] + '.setName("' + TaskPortName[i] + '")'); //Set PortName eval('this.' + TaskPortName[i] + '.setName("' + TaskPortName[i] + '")'); //Set PortName
eval('this.' + TaskPortName[i] + '.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure eval('this.' + TaskPortName[i] + '.setZOrder(-1)'); //Set Z-Order of the port to -1. It will be below all the figure
eval('this.' + TaskPortName[i] + '.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white eval('this.' + TaskPortName[i] + '.setBackgroundColor(new Color(255, 255, 255))'); //Setting Background of the port to white
@@ -268,7 +268,6 @@ bpmnTask.prototype.setWorkflow = function () {
} }
}; };
InputPort.prototype.onDrop = function (port) { InputPort.prototype.onDrop = function (port) {
if (port.getMaxFanOut && port.getMaxFanOut() <= port.getFanOut()) { if (port.getMaxFanOut && port.getMaxFanOut() <= port.getFanOut()) {
return; return;
@@ -294,7 +293,7 @@ InputPort.prototype.onDrop = function (port) {
newObj.reverse = 1; //setting reverse parameter if user is routing from down to up newObj.reverse = 1; //setting reverse parameter if user is routing from down to up
this.workflow.saveRoute(preObj,newObj); this.workflow.saveRoute(preObj,newObj);
} }
//Routing from task to start event //Routing from task to start event
else if(bpmnType.match(/Task/) && port.parentNode.type.match(/Event/) && port.parentNode.type.match(/Start/)) else if(bpmnType.match(/Task/) && port.parentNode.type.match(/Event/) && port.parentNode.type.match(/Start/))
{ {
@@ -344,7 +343,7 @@ InputPort.prototype.onDrop = function (port) {
this.workflow.saveEvents(preObj,workflow.currentSelection); this.workflow.saveEvents(preObj,workflow.currentSelection);
} }
} }
} }
}; };

View File

@@ -593,7 +593,7 @@ Ext.onReady ( function() {
_4562.workflow.taskName = shapes.tasks[k][1]; _4562.workflow.taskName = shapes.tasks[k][1];
workflow.task_width = shapes.tasks[k][4]; workflow.task_width = shapes.tasks[k][4];
workflow.task_height = shapes.tasks[k][5]; workflow.task_height = shapes.tasks[k][5];
NewShape = eval("new bpmnTask()"); NewShape = eval("new bpmnTask(workflow)");
NewShape.x = shapes.tasks[k][2]; NewShape.x = shapes.tasks[k][2];
NewShape.y = shapes.tasks[k][3]; NewShape.y = shapes.tasks[k][3];
NewShape.taskName = shapes.tasks[k][1]; NewShape.taskName = shapes.tasks[k][1];