Skip to content

Commit

Permalink
fixup: complex gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Jul 16, 2024
1 parent e5af40e commit e29ba34
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 13 deletions.
5 changes: 4 additions & 1 deletion src/provider/zeebe/properties/ExecutionListenersProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ export function getListenersList(element) {
}

function canHaveExecutionListeners(bo) {
if (isCompensationBoundaryEvent(bo)) {
if (
isCompensationBoundaryEvent(bo) ||
is(bo, 'bpmn:ComplexGateway')
) {
return false;
}

Expand Down
4 changes: 4 additions & 0 deletions test/spec/provider/zeebe/ExecutionListenerProps.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<bpmn:endEvent id="OtherExtensions">
<bpmn:extensionElements />
</bpmn:endEvent>
<bpmn:complexGateway id="ComplexGateway" />
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process">
Expand Down Expand Up @@ -128,6 +129,9 @@
<bpmndi:BPMNShape id="OtherExtensions_di" bpmnElement="OtherExtensions">
<dc:Bounds x="632" y="592" width="36" height="36" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ComplexGateway_di" bpmnElement="ComplexGateway">
<dc:Bounds x="692" y="592" width="50" height="50" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
30 changes: 18 additions & 12 deletions test/spec/provider/zeebe/ExecutionListenerProps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,27 @@ describe('provider/zeebe - ExecutionListenerProps', function() {
}


it('should NOT display', inject(async function(elementRegistry, selection) {
for (const elementType of [
'CompensationBoundaryEvent',
'ComplexGateway'
]) {

// given
const compensationEvent = elementRegistry.get('CompensationBoundaryEvent');
it(`should NOT display for ${elementType}`, inject(async function(elementRegistry, selection) {

await act(() => {
selection.select(compensationEvent);
});
// given
const compensationEvent = elementRegistry.get(elementType);

// when
const group = getExecutionListenersGroup(container);
await act(() => {
selection.select(compensationEvent);
});

// then
expect(group).not.to.exist;
}));
// when
const group = getExecutionListenersGroup(container);

// then
expect(group).not.to.exist;
}));
}


it('should display proper label', inject(async function(elementRegistry, selection) {
Expand Down Expand Up @@ -279,5 +285,5 @@ function getListeners(element) {
const bo = getBusinessObject(element);
const executionListeners = getExtensionElementsList(bo.get('processRef') || bo, 'zeebe:ExecutionListeners')[0];

return executionListeners.get('listeners');
return (executionListeners && executionListeners.get('listeners')) || [];
}

0 comments on commit e29ba34

Please sign in to comment.