Updated Task Numbering for Task and "Adding Task from ProcessMap Context"
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
bpmnLane = function (_30ab) {
|
||||
VectorFigure.call(this);
|
||||
this.setDimension(500, 300);
|
||||
this.setTaskName(_30ab.taskNo); //It will set the Default Task Name with appropriate count While dragging a task on the canvas
|
||||
// this.setTaskName(_30ab.taskNo); //It will set the Default Task Name with appropriate count While dragging a task on the canvas
|
||||
};
|
||||
|
||||
bpmnLane.prototype = new VectorFigure;
|
||||
|
||||
@@ -1638,6 +1638,37 @@ MyWorkflow.prototype.saveShape= function(oNewShape)
|
||||
});
|
||||
}
|
||||
|
||||
MyWorkflow.prototype.saveTask= function(actiontype,xpos,ypos)
|
||||
{
|
||||
if(actiontype != '')
|
||||
{
|
||||
var pro_uid = this.getUrlVars();
|
||||
var actiontype = actiontype;
|
||||
var pos = '{"x":'+xpos+',"y":'+ypos+'}';
|
||||
switch(actiontype)
|
||||
{
|
||||
case 'addTask':
|
||||
urlparams = '?action='+actiontype+'&data={"uid":"'+ pro_uid +'","position":'+pos+'}';
|
||||
break;
|
||||
|
||||
}
|
||||
Ext.Ajax.request({
|
||||
url: "processes_Ajax.php"+ urlparams,
|
||||
success: function(response) {
|
||||
//Ext.Msg.alert (response.responseText);
|
||||
if(response.responseText != 1 && response.responseText != "")
|
||||
{
|
||||
workflow.newTaskInfo = Ext.util.JSON.decode(response.responseText);
|
||||
workflow.taskName = this.workflow.newTaskInfo.label;
|
||||
workflow.task = eval("new bpmnTask(workflow) ");
|
||||
workflow.addFigure(workflow.task, xpos, ypos);
|
||||
workflow.task.html.id = workflow.newTaskInfo.uid;
|
||||
workflow.task.id = workflow.newTaskInfo.uid;
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
//Deleting shapes silently on swapping task to sub process and vice-versa
|
||||
MyWorkflow.prototype.deleteSilently= function(oShape)
|
||||
{
|
||||
@@ -2136,7 +2167,8 @@ MyWorkflow.prototype.getDeleteCriteria = function()
|
||||
switch (shape) {
|
||||
case 'bpmnTask':
|
||||
workflow.currentSelection.actiontype = 'deleteTask';
|
||||
workflow.taskNo--;
|
||||
if(workflow.taskNo > 0)
|
||||
workflow.taskNo--;
|
||||
break;
|
||||
case 'bpmnSubProcess':
|
||||
workflow.currentSelection.actiontype = 'deleteSubProcess';
|
||||
|
||||
@@ -161,7 +161,7 @@ ProcessMapContext.prototype.exportProcess= function()
|
||||
workflow.FILENAME_LINK = '';
|
||||
workflow.FILENAME_LINKXPDL = '';
|
||||
|
||||
|
||||
|
||||
var exportProcessForm = new Ext.FormPanel({
|
||||
labelWidth : 120, // label settings here cascade unless overridden
|
||||
frame : true,
|
||||
@@ -291,7 +291,14 @@ ProcessMapContext.prototype.exportProcess= function()
|
||||
|
||||
ProcessMapContext.prototype.addTask= function()
|
||||
{
|
||||
Ext.MessageBox.alert('Status','Add Task');
|
||||
var count = ++workflow.taskNo; //Incrementing Task No and assigning it to a local variable
|
||||
workflow.taskName = 'Task '+count;
|
||||
var newShape = eval("new bpmnTask(workflow)");
|
||||
var xPos = workflow.contextX;
|
||||
var yPos = workflow.contextY;
|
||||
workflow.addFigure(newShape, xPos, yPos);
|
||||
newShape.actiontype = 'addTask';
|
||||
workflow.saveShape(newShape); //Saving Annotations when user drags and drops it
|
||||
}
|
||||
|
||||
ProcessMapContext.prototype.horiLine= function()
|
||||
@@ -1872,7 +1879,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
||||
workflow.gridObjectRowSelected = rowSelected;
|
||||
var rowData = ProcMapObj.ExtVariables();
|
||||
console.log(rowData);
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1959,7 +1966,7 @@ ProcessMapContext.prototype.caseTrackerObjects= function()
|
||||
var cto_uid = record.data.CTO_UID;
|
||||
var condition = record.data.CTO_CONDITION;
|
||||
|
||||
|
||||
|
||||
Ext.Ajax.request({
|
||||
url : '../tracker/tracker_Ajax.php',
|
||||
method: 'POST',
|
||||
@@ -2145,7 +2152,7 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
//getting selected row of variables
|
||||
var rowSelected = this.getSelectionModel().getSelected();
|
||||
var rowLabel = rowSelected.data.variable;
|
||||
|
||||
|
||||
//Assigned new object with condition
|
||||
if(typeof getObjectGridRow.colModel != 'undefined')
|
||||
getObjectGridRow.colModel.config[3].editor.setValue(rowLabel);
|
||||
@@ -2199,7 +2206,7 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
TAS_UID : taskId,
|
||||
TRI_UID : getObjectGridRow[0].data.TRI_UID,
|
||||
ST_TYPE : getObjectGridRow[0].data.ST_TYPE
|
||||
|
||||
|
||||
},
|
||||
success: function (response){
|
||||
Ext.MessageBox.alert ('Status','Objects has been edited successfully ');
|
||||
@@ -2282,7 +2289,7 @@ ProcessMapContext.prototype.ExtVariables = function()
|
||||
})
|
||||
window.hide();
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
case 'form':
|
||||
FormSelected = workflow.formSelected;
|
||||
|
||||
@@ -14,8 +14,6 @@ bpmnTask = function (_30ab) {
|
||||
//Setting width and height values as per the zoom ratio
|
||||
if(typeof workflow.zoomTaskWidth != 'undefined' || typeof workflow.zoomTaskHeight != 'undefined')
|
||||
this.setDimension(workflow.zoomTaskWidth, workflow.zoomTaskHeight);
|
||||
|
||||
|
||||
this.taskName = _30ab.taskName; //It will set the Default Task Name with appropriate count While dragging a task on the canvas
|
||||
};
|
||||
|
||||
@@ -98,7 +96,7 @@ bpmnTask.prototype.paint = function () {
|
||||
var fontSize = 11;
|
||||
|
||||
this.bpmnText.setFont('verdana', +fontSize+'px', Font.PLAIN);
|
||||
this.bpmnText.drawStringRect(this.taskName, padleft, padtop, this.rectWidth, rectheight, 'center');
|
||||
this.bpmnText.drawStringRect(workflow.taskName, padleft, padtop, this.rectWidth, rectheight, 'center');
|
||||
// tempcoord = this.coord_converter(this.getWidth(), this.getHeight(), this.taskName.length);
|
||||
// bpmnText.drawTextString(this.taskName, this.getWidth(), this.getHeight(), tempcoord.temp_x, tempcoord.temp_y);
|
||||
|
||||
@@ -353,7 +351,7 @@ OutputPort.prototype.onDrop = function (port) {
|
||||
}
|
||||
|
||||
var connect = true;
|
||||
var conn = this.workflow.checkConnectionsExist(port, 'targetPort', 'OutputPort');
|
||||
var conn = port.workflow.checkConnectionsExist(port, 'targetPort', 'OutputPort');
|
||||
if (conn == 0) //If no connection Exist then Allow connect
|
||||
connect = true;
|
||||
else if (conn < 2) //If One connection exist then Do not Allow to connect
|
||||
@@ -779,8 +777,8 @@ bpmnTask.prototype.addShapes = function (_3896) {
|
||||
* taskNo will have Last Task count
|
||||
* */
|
||||
if (_3896.newShapeName == 'bpmnTask') {
|
||||
count = ++_3896.workflow.taskNo;
|
||||
_3896.workflow.taskName = 'Task ' + count;
|
||||
count = ++workflow.taskNo;
|
||||
workflow.taskName = 'Task ' + count;
|
||||
}
|
||||
|
||||
workflow.subProcessName = 'Sub Process';
|
||||
|
||||
@@ -431,7 +431,8 @@ Ext.onReady ( function() {
|
||||
//Creating Pool
|
||||
var oPool = new bpmnPool(workflow);
|
||||
//workflow.addFigure(oPool,100,70);
|
||||
workflow.taskNo= 0; //Initializing Count for the bpmnTask
|
||||
if(workflow.taskNo == '')
|
||||
workflow.taskNo= 0; //Initializing Count for the bpmnTask
|
||||
var count = 0;
|
||||
this.taskName='';
|
||||
droptarget.notifyDrop=function(dd, e, data)
|
||||
@@ -591,26 +592,26 @@ Ext.onReady ( function() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
workflow.taskNo = 0;
|
||||
//Create all shapes
|
||||
for(var j=0;j< shapeType.length;j++)
|
||||
{
|
||||
// _4562.workflow.taskNo=0;
|
||||
|
||||
|
||||
switch(shapeType[j])
|
||||
{
|
||||
case 'tasks':
|
||||
for(var k=0;k<shapes.tasks.length;k++){
|
||||
var task_boundary = shapes.tasks[k][6];
|
||||
if(task_boundary != null && task_boundary == 'TIMER' && task_boundary == '')
|
||||
_4562.workflow.boundaryEvent = true;
|
||||
workflow.boundaryEvent = true;
|
||||
else
|
||||
_4562.workflow.boundaryEvent = false;
|
||||
workflow.boundaryEvent = false;
|
||||
|
||||
if(k != 0)
|
||||
_4562.workflow.taskNo++;
|
||||
workflow.taskNo++;
|
||||
|
||||
_4562.workflow.taskName = shapes.tasks[k][1];
|
||||
workflow.taskName = shapes.tasks[k][1];
|
||||
workflow.task_width = shapes.tasks[k][4];
|
||||
workflow.task_height = shapes.tasks[k][5];
|
||||
NewShape = eval("new bpmnTask(workflow)");
|
||||
@@ -618,7 +619,7 @@ Ext.onReady ( function() {
|
||||
NewShape.y = shapes.tasks[k][3];
|
||||
NewShape.taskName = shapes.tasks[k][1];
|
||||
workflow.setBoundary(NewShape);
|
||||
_4562.workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
NewShape.html.id = shapes.tasks[k][0];
|
||||
NewShape.id = shapes.tasks[k][0];
|
||||
}
|
||||
@@ -631,7 +632,7 @@ Ext.onReady ( function() {
|
||||
NewShape.x = shapes.gateways[k][2];
|
||||
NewShape.y = shapes.gateways[k][3];
|
||||
workflow.setBoundary(NewShape);
|
||||
_4562.workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
//Setting newshape id to the old shape id
|
||||
NewShape.html.id = shapes.gateways[k][0];
|
||||
NewShape.id = shapes.gateways[k][0];
|
||||
@@ -646,7 +647,7 @@ Ext.onReady ( function() {
|
||||
NewShape.x = shapes.events[k][2];
|
||||
NewShape.y = shapes.events[k][3];
|
||||
workflow.setBoundary(NewShape);
|
||||
_4562.workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
//Setting newshape id to the old shape id
|
||||
NewShape.html.id = shapes.events[k][0];
|
||||
NewShape.id = shapes.events[k][0];
|
||||
@@ -655,14 +656,14 @@ Ext.onReady ( function() {
|
||||
break;
|
||||
case 'annotations':
|
||||
for(var k=0;k<shapes.annotations.length;k++){
|
||||
_4562.workflow.annotationName = shapes.annotations[k][1];
|
||||
workflow.annotationName = shapes.annotations[k][1];
|
||||
workflow.anno_width = shapes.annotations[k][4];
|
||||
workflow.anno_height = shapes.annotations[k][5];
|
||||
NewShape = eval("new bpmnAnnotation(_4562.workflow)");
|
||||
NewShape.x = shapes.annotations[k][2];
|
||||
NewShape.y = shapes.annotations[k][3];
|
||||
workflow.setBoundary(NewShape);
|
||||
_4562.workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
//Setting newshape id to the old shape id
|
||||
NewShape.html.id = shapes.annotations[k][0];
|
||||
NewShape.id = shapes.annotations[k][0];
|
||||
@@ -670,12 +671,12 @@ Ext.onReady ( function() {
|
||||
break;
|
||||
case 'subprocess':
|
||||
for(var k=0;k<shapes.subprocess.length;k++){
|
||||
_4562.workflow.subProcessName = shapes.subprocess[k][1];
|
||||
workflow.subProcessName = shapes.subprocess[k][1];
|
||||
NewShape = eval("new bpmnSubProcess(_4562.workflow)");
|
||||
NewShape.x = shapes.subprocess[k][2];
|
||||
NewShape.y = shapes.subprocess[k][3];
|
||||
workflow.setBoundary(NewShape);
|
||||
_4562.workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
workflow.addFigure(NewShape, NewShape.x, NewShape.y);
|
||||
//Setting newshape id to the old shape id
|
||||
NewShape.html.id = shapes.subprocess[k][0];
|
||||
NewShape.id = shapes.subprocess[k][0];
|
||||
@@ -683,6 +684,8 @@ Ext.onReady ( function() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(typeof(workflow.taskNo) != 'undefined')
|
||||
workflow.taskNo++;
|
||||
return shapes;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user