diff --git a/src/provider/zeebe/utils/InputOutputUtil.js b/src/provider/zeebe/utils/InputOutputUtil.js index 608a25a85..8db2e8555 100644 --- a/src/provider/zeebe/utils/InputOutputUtil.js +++ b/src/provider/zeebe/utils/InputOutputUtil.js @@ -21,6 +21,8 @@ import { getEventDefinition } from '../../bpmn/utils/EventDefinitionUtil'; +import { isPropagateAllChildVariables } from '../properties/OutputPropagationProps'; + function getElements(bo, type, prop) { const elems = getExtensionElementsList(bo, type); return !prop ? elems : (elems[0] || {})[prop] || []; @@ -86,12 +88,15 @@ export function areOutputParametersSupported(element) { return false; } + if (is(element, 'bpmn:CallActivity')) { + return !isPropagateAllChildVariables(element); + } + return isAny(element, [ 'zeebe:ZeebeServiceTask', 'bpmn:UserTask', 'bpmn:SubProcess', 'bpmn:ReceiveTask', - 'bpmn:CallActivity', 'bpmn:Event', 'bpmn:BusinessRuleTask' ]); diff --git a/test/spec/provider/zeebe/OutputProps.bpmn b/test/spec/provider/zeebe/OutputProps.bpmn index 25d0bd821..2c092fc6e 100644 --- a/test/spec/provider/zeebe/OutputProps.bpmn +++ b/test/spec/provider/zeebe/OutputProps.bpmn @@ -1,5 +1,5 @@ - + @@ -36,6 +36,11 @@ + + + + + @@ -66,6 +71,10 @@ + + + + diff --git a/test/spec/provider/zeebe/OutputProps.spec.js b/test/spec/provider/zeebe/OutputProps.spec.js index d685f8643..52e29cf9f 100644 --- a/test/spec/provider/zeebe/OutputProps.spec.js +++ b/test/spec/provider/zeebe/OutputProps.spec.js @@ -315,6 +315,57 @@ describe('provider/zeebe - OutputProps', function() { expect(outputGroup).to.not.exist; })); }); + + + describe('bpmn:CallActivity#output', function() { + + it('should display if `propagateAllChildVariables` is false', + inject(async function(elementRegistry, selection) { + + // given + const callActivity = elementRegistry.get('CallActivity_1'); + + // when + await act(() => { + selection.select(callActivity); + }); + + // then + const outputGroup = getGroup(container, 'outputs'); + expect(outputGroup).to.exist; + }) + ); + + + it('should not display if `propagateAllChildVariables` is true', + inject(async function(elementRegistry, selection) { + + // given + const callActivity = elementRegistry.get('CallActivity_1'); + + // when + await act(() => { + selection.select(callActivity); + }); + + const outputPropagationGroup = getGroup(container, 'outputPropagation'); + const outputPropagationGroupHeader = domQuery('.bio-properties-panel-group-header', outputPropagationGroup); + + await act(() => { + outputPropagationGroupHeader.click(); + }); + + const propagateAllChildVariablesToggle = domQuery('#bio-properties-panel-propagateAllChildVariables', container); + await act(() => { + propagateAllChildVariablesToggle.click(); + }); + + // then + const outputGroup = getGroup(container, 'outputs'); + expect(outputGroup).to.not.exist; + }) + ); + }); });