From 3ad2ba8ca3e9f71091914be5fbbb59dae15df7f3 Mon Sep 17 00:00:00 2001 From: safan Date: Mon, 28 Feb 2011 05:59:24 +0000 Subject: [PATCH] updated code for annotation saving and loading with dotted line --- workflow/engine/templates/bpmn/bpmnShapes.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/workflow/engine/templates/bpmn/bpmnShapes.js b/workflow/engine/templates/bpmn/bpmnShapes.js index a9fcebfbe..ebc7e7de3 100755 --- a/workflow/engine/templates/bpmn/bpmnShapes.js +++ b/workflow/engine/templates/bpmn/bpmnShapes.js @@ -327,7 +327,12 @@ InputPort.prototype.onDrop = function (port) { if (_4070.source.type == _4070.target.type) { return; } - _4070.setConnection(new DecoratedConnection()); + + if(this.workflow.currentSelection.type.match(/Annotation/)) //Setting connection to Dotted for Annotation + _4070.setConnection(new DottedConnection()); + else + _4070.setConnection(new DecoratedConnection()); + this.parentNode.workflow.getCommandStack().execute(_4070); //Saving Start Event @@ -380,9 +385,7 @@ InputPort.prototype.onDrop = function (port) { workflow.saveEvents(workflow.currentSelection); } else if(bpmnType.match(/Annotation/)) { //Routing from task to Annotation - _4070.setConnection(new DottedConnection()); newObj = port.parentNode; - newObj.conn = _4070.connection; preObj = this.workflow.currentSelection; newObj.actiontype = 'updateText'; this.workflow.saveShape(newObj); @@ -410,7 +413,12 @@ OutputPort.prototype.onDrop = function (port) { if (_4070.source.type == _4070.target.type) { return; } - _4070.setConnection(new DecoratedConnection()); + + if(port.parentNode.type.match(/Annotation/)) //Setting connection to Dotted for Annotation + _4070.setConnection(new DottedConnection()); + else + _4070.setConnection(new DecoratedConnection()); + this.parentNode.workflow.getCommandStack().execute(_4070); //Saving Start Event @@ -452,9 +460,7 @@ OutputPort.prototype.onDrop = function (port) { this.workflow.saveRoute(newObj,preObj); } else if(port.parentNode.type.match(/Annotation/)){ //Routing from task to Annotation - _4070.setConnection(new DottedConnection()); newObj = port.parentNode; - newObj.conn = _4070.connection; preObj = this.workflow.currentSelection; newObj.actiontype = 'updateText'; this.workflow.saveShape(newObj);