From 5ab0db65a54192f77ab28b6d623a94861eb0105f Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Tue, 26 Jan 2016 18:24:05 +0100 Subject: [PATCH] fix(rules): allow TextAnnotation inside SubProcesses --- lib/features/rules/BpmnRules.js | 3 ++- test/spec/features/rules/BpmnRulesSpec.js | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/features/rules/BpmnRules.js b/lib/features/rules/BpmnRules.js index fd2def43..d0d4ecde 100644 --- a/lib/features/rules/BpmnRules.js +++ b/lib/features/rules/BpmnRules.js @@ -371,7 +371,8 @@ function canDrop(element, target, position) { 'bpmn:Collaboration', 'bpmn:Lane', 'bpmn:Participant', - 'bpmn:Process' ]); + 'bpmn:Process', + 'bpmn:SubProcess' ]); } if (is(element, 'bpmn:MessageFlow')) { diff --git a/test/spec/features/rules/BpmnRulesSpec.js b/test/spec/features/rules/BpmnRulesSpec.js index 559d5c6e..09b5e49e 100644 --- a/test/spec/features/rules/BpmnRulesSpec.js +++ b/test/spec/features/rules/BpmnRulesSpec.js @@ -96,6 +96,12 @@ describe('features/modeling/rules - BpmnRules', function() { })); + it('drop TextAnnotation -> SubProcess', inject(function() { + + expectCanDrop('TextAnnotation', 'SubProcess', true); + })); + + it('connect DataObjectReference -> StartEvent_None', inject(function() { expectCanConnect('DataObjectReference', 'StartEvent_None', {