From d1c222feaec2ea467e1909b3c9dd0f2faa1f78af Mon Sep 17 00:00:00 2001 From: Tihomir Surdilovic Date: Wed, 19 Mar 2014 12:07:51 -0400 Subject: [PATCH] BZ 1078241 - jBPM Designer does not create custom tasks properly --- .../designer/public/js/Plugins/shaperepository.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/jbpm-designer-client/src/main/resources/org/jbpm/designer/public/js/Plugins/shaperepository.js b/jbpm-designer-client/src/main/resources/org/jbpm/designer/public/js/Plugins/shaperepository.js index 1dfd3d008b..9357434dba 100644 --- a/jbpm-designer-client/src/main/resources/org/jbpm/designer/public/js/Plugins/shaperepository.js +++ b/jbpm-designer-client/src/main/resources/org/jbpm/designer/public/js/Plugins/shaperepository.js @@ -361,6 +361,15 @@ ORYX.Plugins.ShapeRepository = { var position = this.facade.eventCoordinates( event.browserEvent ); var typeParts = option.type.split("#"); + var isCustom = false; + if(ORYX.PREPROCESSING) { + var customParts = ORYX.PREPROCESSING.split(","); + for (var i = 0; i < customParts.length; i++) { + if(customParts[i] == typeParts[1]) { + isCustom = true; + } + } + } if(typeParts[1].startsWith("wp-")) { this.facade.raiseEvent({ type: ORYX.CONFIG.CREATE_PATTERN, @@ -368,7 +377,7 @@ ORYX.Plugins.ShapeRepository = { pdata: this._patternData, pos: position }); - } else if(typeParts[1].endsWith("Task")) { + } else if(typeParts[1].endsWith("Task") && !isCustom) { var ttype = typeParts[1]; ttype = ttype.substring(0, ttype.length - 4); option.type = typeParts[0] + "#Task";