diff --git a/lib/draw/BpmnRenderer.js b/lib/draw/BpmnRenderer.js index c4ba9f53..8af0d2d0 100644 --- a/lib/draw/BpmnRenderer.js +++ b/lib/draw/BpmnRenderer.js @@ -902,6 +902,12 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) { renderLabel(p, text2, { box: data, align: 'center-middle' }); } + var participantMultiplicity = !!(bpmnRegistry.getSemantic(data.id).participantMultiplicity); + + if(participantMultiplicity) { + renderer('ParticipantMultiplicityMarker')(p, data); + } + return lane; }, 'bpmn:Lane': function(p, data) { @@ -1236,6 +1242,20 @@ function BpmnRenderer(events, styles, bpmnRegistry, pathMap) { return label; }, + 'ParticipantMultiplicityMarker': function(p, data) { + var subProcessPath = pathMap.getScaledPath('MARKER_PARALLEL', { + xScaleFactor: 1, + yScaleFactor: 1, + containerWidth: data.width, + containerHeight: data.height, + position: { + mx: ((data.width / 2) / data.width), + my: (data.height - 15) / data.height + } + }); + var pmm = drawPath(p, subProcessPath); + pmm.attr(''); + }, 'SubProcessMarker': function(p, data) { var markerRect = drawRect(p, 14, 14, 0); // Process marker is placed in the middle of the box diff --git a/test/fixtures/bpmn/render/pools-with-collection-marker.bpmn b/test/fixtures/bpmn/render/pools-with-collection-marker.bpmn new file mode 100644 index 00000000..f64a1e54 --- /dev/null +++ b/test/fixtures/bpmn/render/pools-with-collection-marker.bpmn @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/spec/browser/draw/BpmnRendererSpec.js b/test/spec/browser/draw/BpmnRendererSpec.js index 4a6a62b8..4dce83c7 100644 --- a/test/spec/browser/draw/BpmnRendererSpec.js +++ b/test/spec/browser/draw/BpmnRendererSpec.js @@ -17,6 +17,17 @@ describe('draw/BpmnRenderer', function() { }); + it('should render pool collection marker', function(done) { + + var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/render/pools-with-collection-marker.bpmn', 'utf8'); + + var renderer = new Viewer(container); + + renderer.importXML(xml, function(err) { + done(err); + }); + }); + it('should render conditional flows', function(done) { var xml = fs.readFileSync(__dirname + '/../../../fixtures/bpmn/render/conditional-flow.bpmn', 'utf8');