diff --git a/lib/features/rules/BpmnRules.js b/lib/features/rules/BpmnRules.js index 72e49852..24fc6def 100644 --- a/lib/features/rules/BpmnRules.js +++ b/lib/features/rules/BpmnRules.js @@ -420,7 +420,9 @@ function canDrop(element, target, position) { } if (is(element, 'bpmn:MessageFlow')) { - return is(target, 'bpmn:Collaboration'); + return is(target, 'bpmn:Collaboration') + || element.source.parent == target + || element.target.parent == target; } return false; diff --git a/test/spec/features/rules/BpmnRules.multiSelectionPools.bpmn b/test/spec/features/rules/BpmnRules.multiSelectionPools.bpmn new file mode 100644 index 00000000..d2654af2 --- /dev/null +++ b/test/spec/features/rules/BpmnRules.multiSelectionPools.bpmn @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/spec/features/rules/BpmnRulesSpec.js b/test/spec/features/rules/BpmnRulesSpec.js index bffd3b3a..8b191fc1 100644 --- a/test/spec/features/rules/BpmnRulesSpec.js +++ b/test/spec/features/rules/BpmnRulesSpec.js @@ -890,6 +890,31 @@ describe('features/modeling/rules - BpmnRules', function() { }); + describe('multi selection move', function() { + + var testXML = require('./BpmnRules.multiSelectionPools.bpmn'); + + beforeEach(bootstrapModeler(testXML, { modules: testModules })); + + it('is allowed across pools when parent does not change', inject(function(elementRegistry) { + + // when + var elements = [ + elementRegistry.get('Task_A'), + elementRegistry.get('Task_B'), + elementRegistry.get('MessageFlow_1v3u2fb') + ]; + + var target = 'Participant_1'; + + // then + expectCanMove(elements, target, { + attach: false, + move: true + }); + })); + }); + describe('event move', function() { var testXML = require('../../../fixtures/bpmn/boundary-events.bpmn');