feat(context-pad): integrate DataStore pad

Related to #345
This commit is contained in:
Nico Rehwaldt 2016-01-25 21:26:46 +01:00 committed by pedesen
parent 4f28d14cbc
commit 6b27ee4301
3 changed files with 28 additions and 2 deletions

View File

@ -292,7 +292,7 @@ ContextPadProvider.prototype.getContextPadEntries = function(element) {
}); });
} }
if (is(businessObject, 'bpmn:DataObjectReference')) { if (isAny(businessObject, [ 'bpmn:DataObjectReference', 'bpmn:DataStoreReference' ])) {
assign(actions, { assign(actions, {
'connect': { 'connect': {
group: 'connect', group: 'connect',

View File

@ -8,6 +8,9 @@
<bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="Task_1"> <bpmn2:boundaryEvent id="BoundaryEvent_1" name="" attachedToRef="Task_1">
<bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/> <bpmn2:compensateEventDefinition id="CompensateEventDefinition_1" waitForCompletion="true"/>
</bpmn2:boundaryEvent> </bpmn2:boundaryEvent>
<bpmn2:dataStoreReference id="DataStoreReference" />
<bpmn2:dataObject id="DataObject_1" name="Data Object 1"/>
<bpmn2:dataObjectReference id="DataObjectReference" dataObjectRef="DataObject_1"/>
</bpmn2:process> </bpmn2:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
@ -32,6 +35,18 @@
<bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_2" bpmnElement="BoundaryEvent_1"> <bpmndi:BPMNShape id="_BPMNShape_BoundaryEvent_2" bpmnElement="BoundaryEvent_1">
<dc:Bounds height="36.0" width="36.0" x="109.0" y="242.0"/> <dc:Bounds height="36.0" width="36.0" x="109.0" y="242.0"/>
</bpmndi:BPMNShape> </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_DataStoreReference_2" bpmnElement="DataStoreReference">
<dc:Bounds height="50.0" width="50.0" x="109.0" y="312.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="21.0" width="79.0" x="95.0" y="367.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="_BPMNShape_DataObjectReference_2" bpmnElement="DataObjectReference">
<dc:Bounds height="50.0" width="36.0" x="313.0" y="312.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="21.0" width="149.0" x="257.0" y="367.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane> </bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram> </bpmndi:BPMNDiagram>
</bpmn2:definitions> </bpmn2:definitions>

View File

@ -9,7 +9,7 @@ var domQuery = require('min-dom/lib/query');
var is = require('../../../../lib/util/ModelUtil').is; var is = require('../../../../lib/util/ModelUtil').is;
/* global bootstrapViewer, inject */ /* global bootstrapModeler, inject */
var contextPadModule = require('../../../../lib/features/context-pad'), var contextPadModule = require('../../../../lib/features/context-pad'),
@ -245,6 +245,17 @@ describe('features - context-pad', function() {
]); ]);
})); }));
it('should provide DataStoreReference entries', inject(function() {
expectContextPadEntries('DataStoreReference', [
'connect',
'!replace',
'!append.end-event',
'!append.text-annotation'
]);
}));
}); });