fix(rules): allow message flows between collapsed pools
Adresses camunda/camunda-modeler#782
This commit is contained in:
parent
82fac245be
commit
68f85a171d
|
@ -7,6 +7,7 @@ All notable changes to [bpmn-js](https://github.com/bpmn-io/bpmn-js) are documen
|
|||
___Note:__ Yet to be released changes appear here._
|
||||
|
||||
* `FEAT`: add initial snapping when creating associations
|
||||
* `FIX`: allow message flows between collapsed pools
|
||||
|
||||
## 1.1.1
|
||||
|
||||
|
|
|
@ -221,7 +221,10 @@ function getOrganizationalParent(element) {
|
|||
}
|
||||
|
||||
if (is(element, 'bpmn:Participant')) {
|
||||
return getBusinessObject(element).processRef;
|
||||
return (
|
||||
getBusinessObject(element).processRef ||
|
||||
getBusinessObject(element)
|
||||
);
|
||||
}
|
||||
} while ((element = element.parent));
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_ah3a1f" targetNamespace="http://bpmn.io/bpmn" exporter="http://bpmn.io" exporterVersion="0.10.1">
|
||||
<collaboration id="Collaboration_1">
|
||||
<participant id="CollapsedPool_A" name="A" />
|
||||
<participant id="CollapsedPool_B" name="B" />
|
||||
<participant id="ExpandedPool" name="C" processRef="Process_C" />
|
||||
</collaboration>
|
||||
<process id="Process_C" />
|
||||
<bpmndi:BPMNDiagram id="BpmnDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BpmnPlane_1" bpmnElement="Collaboration_1">
|
||||
<bpmndi:BPMNShape id="Participant_150rzdx_di" bpmnElement="CollapsedPool_A">
|
||||
<omgdc:Bounds x="142" y="79" width="355" height="100" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="CollapsedPool_B_di" bpmnElement="CollapsedPool_B">
|
||||
<omgdc:Bounds x="142" y="237" width="355" height="100" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="ExpandedPool_di" bpmnElement="ExpandedPool">
|
||||
<omgdc:Bounds x="565" y="79" width="305" height="99" />
|
||||
</bpmndi:BPMNShape>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
|
@ -926,6 +926,51 @@ describe('features/modeling/rules - BpmnRules', function() {
|
|||
});
|
||||
|
||||
|
||||
describe('participants', function() {
|
||||
|
||||
var testXML = require('./BpmnRules.collapsedPools.bpmn');
|
||||
|
||||
beforeEach(bootstrapModeler(testXML, { modules: testModules }));
|
||||
|
||||
|
||||
it('connect CollapsedPool_A -> CollapsedPool_B', inject(function() {
|
||||
|
||||
expectCanConnect('CollapsedPool_A', 'CollapsedPool_B', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: true,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
|
||||
it('connect CollapsedPool_A -> ExpandedPool', inject(function() {
|
||||
|
||||
expectCanConnect('CollapsedPool_A', 'ExpandedPool', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: true,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
|
||||
it('connect ExpandedPool -> CollapsedPool_A', inject(function() {
|
||||
|
||||
expectCanConnect('ExpandedPool', 'CollapsedPool_A', {
|
||||
sequenceFlow: false,
|
||||
messageFlow: true,
|
||||
association: false,
|
||||
dataAssociation: false
|
||||
});
|
||||
|
||||
}));
|
||||
|
||||
});
|
||||
|
||||
|
||||
describe('message flows', function() {
|
||||
|
||||
var testXML = require('./BpmnRules.messageFlow.bpmn');
|
||||
|
|
Loading…
Reference in New Issue