feat(label-editing): support data input/output

Related to #951
This commit is contained in:
Nico Rehwaldt 2019-03-25 16:43:41 +01:00 committed by Philipp Fromme
parent 89719de3be
commit 2fff30a284
3 changed files with 38 additions and 6 deletions

View File

@ -1,12 +1,15 @@
import { is } from '../../util/ModelUtil';
function getLabelAttr(semantic) {
if (is(semantic, 'bpmn:FlowElement') ||
is(semantic, 'bpmn:Participant') ||
is(semantic, 'bpmn:Lane') ||
is(semantic, 'bpmn:SequenceFlow') ||
is(semantic, 'bpmn:MessageFlow')) {
if (
is(semantic, 'bpmn:FlowElement') ||
is(semantic, 'bpmn:Participant') ||
is(semantic, 'bpmn:Lane') ||
is(semantic, 'bpmn:SequenceFlow') ||
is(semantic, 'bpmn:MessageFlow') ||
is(semantic, 'bpmn:DataInput') ||
is(semantic, 'bpmn:DataOutput')
) {
return 'name';
}

View File

@ -21,6 +21,16 @@
<bpmn:flowNodeRef>EndEvent_1</bpmn:flowNodeRef>
</bpmn:lane>
</bpmn:laneSet>
<bpmn:ioSpecification>
<bpmn:dataInput name="Input" isCollection="false" id="DataInput"/>
<bpmn:dataOutput name="Output" isCollection="false" id="DataOutput"/>
<bpmn:inputSet id="_9f9aea93-30cd-4899-bbe1-e62165c3dbc9">
<bpmn:dataInputRefs>DataInput</bpmn:dataInputRefs>
</bpmn:inputSet>
<bpmn:outputSet id="_8154d47e-5733-41c1-8125-29ff926b3cd2">
<bpmn:dataOutputRefs>DataOutput</bpmn:dataOutputRefs>
</bpmn:outputSet>
</bpmn:ioSpecification>
<bpmn:startEvent id="StartEvent_1" name="FOO">
<bpmn:outgoing>SequenceFlow_2</bpmn:outgoing>
</bpmn:startEvent>
@ -173,6 +183,18 @@
<bpmndi:BPMNShape id="Participant_0kzj58d_di" bpmnElement="Participant_2">
<dc:Bounds x="161" y="646" width="600" height="250" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DataOutput_di" bpmnElement="DataOutput">
<dc:Bounds x="265" y="150" width="34" height="40"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="12" width="30" x="265" y="195"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="DataInput_di" bpmnElement="DataInput">
<dc:Bounds x="220" y="150" width="34" height="40"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="12" width="30" x="220" y="200"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

View File

@ -22,6 +22,7 @@ describe('features - label-editing', function() {
var diagramXML = require('./LabelEditing.bpmn');
describe('basics', function() {
beforeEach(bootstrapModeler(diagramXML, {
@ -405,7 +406,13 @@ describe('features - label-editing', function() {
it('lane without label', directEdit('Lane_2'));
it('data input', directEdit('DataInput'));
it('data output', directEdit('DataOutput'));
});
});