Skip to content

Commit

Permalink
fix(draw): render colored BPMN group elements
Browse files Browse the repository at this point in the history
  • Loading branch information
nikku committed Nov 25, 2019
1 parent be8cdd2 commit 5b7bafc
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 44 deletions.
1 change: 1 addition & 0 deletions lib/draw/BpmnRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,7 @@ export default function BpmnRenderer(
'bpmn:Group': function(parentGfx, element) {

var group = drawRect(parentGfx, element.width, element.height, TASK_BORDER_RADIUS, {
stroke: getStrokeColor(element, defaultStrokeColor),
strokeWidth: 1,
strokeDasharray: '8,3,1,3',
fill: 'none',
Expand Down
98 changes: 54 additions & 44 deletions test/spec/draw/BpmnRenderer.colors.bpmn
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4">
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
<bpmn:collaboration id="Collaboration_12gf8gk">
<bpmn:participant id="Participant_11xqomt" name="Regressnahme &#10;Sachbearbeiter" processRef="Process_1" />
<bpmn:participant id="Participant_0igvg0r" />
<bpmn:messageFlow id="MessageFlow_11bysyp" sourceRef="Task_04aofbe" targetRef="Participant_0igvg0r" />
<bpmn:messageFlow id="MessageFlow_1qyovto" sourceRef="Participant_0igvg0r" targetRef="Task_04aofbe" />
<bpmn:group id="Group_1acsrf8" categoryValueRef="CategoryValue_1ddy455" />
</bpmn:collaboration>
<bpmn:process id="Process_1" isExecutable="false">
<bpmn:sequenceFlow id="SequenceFlow_17ohrlh" sourceRef="Task_04aofbe" targetRef="EndEvent_01a6rq8" />
<bpmn:sequenceFlow id="SequenceFlow_1qt82pt" name="Nein" sourceRef="ExclusiveGateway_092mc05" targetRef="Task_04aofbe" />
<bpmn:sequenceFlow id="SequenceFlow_0pqo7zt" name="Ja" sourceRef="ExclusiveGateway_092mc05" targetRef="Task_02fdytg" />
<bpmn:sequenceFlow id="SequenceFlow_0h9s0mp" sourceRef="Task_0iirfhd" targetRef="ExclusiveGateway_092mc05" />
<bpmn:sequenceFlow id="SequenceFlow_1jrsqqc" sourceRef="StartEvent_1mnut37" targetRef="Task_0iirfhd" />
<bpmn:startEvent id="StartEvent_1mnut37" name="Regressverdacht gemeldet">
<bpmn:outgoing>SequenceFlow_1jrsqqc</bpmn:outgoing>
<bpmn:messageEventDefinition />
Expand Down Expand Up @@ -46,110 +42,124 @@
<bpmn:dataStoreReference id="DataStoreReference_1clvrcw" name="DATA" />
<bpmn:dataObjectReference id="DataObjectReference_0iua582" dataObjectRef="DataObject_0lo7sfa" />
<bpmn:dataObject id="DataObject_0lo7sfa" />
<bpmn:sequenceFlow id="SequenceFlow_1jrsqqc" sourceRef="StartEvent_1mnut37" targetRef="Task_0iirfhd" />
<bpmn:sequenceFlow id="SequenceFlow_0h9s0mp" sourceRef="Task_0iirfhd" targetRef="ExclusiveGateway_092mc05" />
<bpmn:sequenceFlow id="SequenceFlow_0pqo7zt" name="Ja" sourceRef="ExclusiveGateway_092mc05" targetRef="Task_02fdytg" />
<bpmn:sequenceFlow id="SequenceFlow_1qt82pt" name="Nein" sourceRef="ExclusiveGateway_092mc05" targetRef="Task_04aofbe" />
<bpmn:sequenceFlow id="SequenceFlow_17ohrlh" sourceRef="Task_04aofbe" targetRef="EndEvent_01a6rq8" />
</bpmn:process>
<bpmn:category id="Category_0hd9khm">
<bpmn:categoryValue id="CategoryValue_1ddy455" value="GROUP" />
</bpmn:category>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Collaboration_12gf8gk">
<bpmndi:BPMNShape id="Participant_11xqomt_di" bpmnElement="Participant_11xqomt">
<dc:Bounds x="25" y="143" width="665" height="305" />
<bpmndi:BPMNShape id="Participant_11xqomt_di" bpmnElement="Participant_11xqomt" isHorizontal="true">
<dc:Bounds x="155" y="143" width="665" height="305" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="StartEvent_1mnut37_di" bpmnElement="StartEvent_1mnut37">
<dc:Bounds x="101" y="211" width="36" height="36" />
<dc:Bounds x="231" y="211" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="77" y="247" width="84" height="24" />
<dc:Bounds x="207" y="247" width="84" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Task_0iirfhd_di" bpmnElement="Task_0iirfhd" bioc:stroke="blue" bioc:fill="yellow">
<dc:Bounds x="196" y="189" width="100" height="80" />
<dc:Bounds x="326" y="189" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1jrsqqc_di" bpmnElement="SequenceFlow_1jrsqqc" bioc:stroke="blue" bioc:fill="yellow">
<di:waypoint x="137" y="229" />
<di:waypoint x="196" y="229" />
<di:waypoint x="267" y="229" />
<di:waypoint x="326" y="229" />
<bpmndi:BPMNLabel>
<dc:Bounds x="122" y="219" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_092mc05_di" bpmnElement="ExclusiveGateway_092mc05" isMarkerVisible="true" bioc:stroke="blue" bioc:fill="yellow">
<dc:Bounds x="318" y="204" width="50" height="50" />
<dc:Bounds x="448" y="204" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="320" y="163" width="45" height="24" />
<dc:Bounds x="450" y="163" width="45" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0h9s0mp_di" bpmnElement="SequenceFlow_0h9s0mp" bioc:stroke="rgba(255, 0, 0, 0.9)">
<di:waypoint x="296" y="229" />
<di:waypoint x="318" y="229" />
<di:waypoint x="426" y="229" />
<di:waypoint x="448" y="229" />
<bpmndi:BPMNLabel>
<dc:Bounds x="262" y="219" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Task_02fdytg_di" bpmnElement="Task_02fdytg">
<dc:Bounds x="430" y="189" width="100" height="80" />
<dc:Bounds x="560" y="189" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0pqo7zt_di" bpmnElement="SequenceFlow_0pqo7zt" bioc:stroke="#3399aa">
<di:waypoint x="368" y="229" />
<di:waypoint x="430" y="229" />
<di:waypoint x="498" y="229" />
<di:waypoint x="560" y="229" />
<bpmndi:BPMNLabel>
<dc:Bounds x="392" y="210" width="13" height="12" />
<dc:Bounds x="523" y="210" width="12" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Task_04aofbe_di" bpmnElement="Task_04aofbe">
<dc:Bounds x="430" y="311" width="100" height="80" />
<dc:Bounds x="560" y="311" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qt82pt_di" bpmnElement="SequenceFlow_1qt82pt" bioc:stroke="blue" bioc:fill="yellow">
<di:waypoint x="343" y="229" />
<di:waypoint x="343" y="351" />
<di:waypoint x="430" y="351" />
<di:waypoint x="473" y="229" />
<di:waypoint x="473" y="351" />
<di:waypoint x="560" y="351" />
<bpmndi:BPMNLabel>
<dc:Bounds x="348" y="282" width="23" height="12" />
<dc:Bounds x="478" y="282" width="23" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_01a6rq8_di" bpmnElement="EndEvent_01a6rq8">
<dc:Bounds x="574" y="333" width="36" height="36" />
<dc:Bounds x="704" y="333" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="561" y="369" width="62" height="24" />
<dc:Bounds x="692" y="369" width="61" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_17ohrlh_di" bpmnElement="SequenceFlow_17ohrlh" bioc:stroke="rgb(251, 140, 0)" bioc:fill="rgb(255, 224, 178)">
<di:waypoint x="530" y="351" />
<di:waypoint x="574" y="351" />
<di:waypoint x="660" y="351" />
<di:waypoint x="704" y="351" />
<bpmndi:BPMNLabel>
<dc:Bounds x="507" y="341" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Participant_0j5gs6j_di" bpmnElement="Participant_0igvg0r">
<dc:Bounds x="313" y="548" width="378" height="60" />
<bpmndi:BPMNShape id="Participant_0j5gs6j_di" bpmnElement="Participant_0igvg0r" isHorizontal="true">
<dc:Bounds x="443" y="548" width="378" height="60" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="MessageFlow_11bysyp_di" bpmnElement="MessageFlow_11bysyp" bioc:stroke="#FB8C00" bioc:fill="#FFE0B2">
<di:waypoint x="464" y="391" />
<di:waypoint x="464" y="548" />
<di:waypoint x="594" y="391" />
<di:waypoint x="594" y="548" />
<bpmndi:BPMNLabel>
<dc:Bounds x="434" y="470" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="MessageFlow_1qyovto_di" bpmnElement="MessageFlow_1qyovto" bioc:stroke="#FB8C00" bioc:fill="#FFE0B2">
<di:waypoint x="501" y="548" />
<di:waypoint x="501" y="391" />
<di:waypoint x="631" y="548" />
<di:waypoint x="631" y="391" />
<bpmndi:BPMNLabel>
<dc:Bounds x="471" y="470" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="DataStoreReference_1clvrcw_di" bpmnElement="DataStoreReference_1clvrcw">
<dc:Bounds x="143" y="364" width="50" height="50" />
<dc:Bounds x="273" y="364" width="50" height="50" />
<bpmndi:BPMNLabel>
<dc:Bounds x="154" y="414" width="29" height="12" />
<dc:Bounds x="284" y="414" width="29" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="DataInputAssociation_1ncouqr_di" bpmnElement="DataInputAssociation_1ncouqr" bioc:stroke="#FB8C00" bioc:fill="#FFE0B2">
<di:waypoint x="180" y="364" />
<di:waypoint x="226" y="269" />
<di:waypoint x="310" y="364" />
<di:waypoint x="356" y="269" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="DataObjectReference_0iua582_di" bpmnElement="DataObjectReference_0iua582">
<dc:Bounds x="283" y="345" width="36" height="50" />
<dc:Bounds x="413" y="345" width="36" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="DataOutputAssociation_1i89wkc_di" bpmnElement="DataOutputAssociation_1i89wkc" bioc:stroke="#FB8C00" bioc:fill="#FFE0B2">
<di:waypoint x="242" y="269" />
<di:waypoint x="233" y="345" />
<di:waypoint x="283" y="363" />
<di:waypoint x="372" y="269" />
<di:waypoint x="363" y="345" />
<di:waypoint x="413" y="363" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="Group_1acsrf8_di" bpmnElement="Group_1acsrf8" bioc:stroke="rgb(67, 160, 71)" bioc:fill="rgb(200, 230, 201)">
<dc:Bounds x="910" y="80" width="300" height="300" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1040" y="87" width="40" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

0 comments on commit 5b7bafc

Please sign in to comment.