Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions test/fixtures/zeebe/mappings/unresolvable-path-expression.bpmn
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.44.0" modeler:executionPlatform="Camunda Cloud" modeler:executionPlatformVersion="8.1.0">
<bpmn:process id="Process_1" isExecutable="true">
<bpmn:subProcess id="SubProcess_1" name="SubProcess_1">
<bpmn:extensionElements>
<zeebe:ioMapping>
<zeebe:input source="=agent.context" target="agentContext" />
<zeebe:output source="=agent" target="agent" />
</zeebe:ioMapping>
</bpmn:extensionElements>
</bpmn:subProcess>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="SubProcess_1_di" bpmnElement="SubProcess_1" isExpanded="true">
<dc:Bounds x="160" y="80" width="350" height="200" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
33 changes: 33 additions & 0 deletions test/spec/zeebe/Mappings.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import propagationXML from 'test/fixtures/zeebe/mappings/propagation.bpmn';
import scriptTaskXML from 'test/fixtures/zeebe/mappings/script-task.bpmn';
import scriptTaskEmptyExpressionXML from 'test/fixtures/zeebe/mappings/script-task-empty-expression.bpmn';
import scriptTaskOutputNoNameXML from 'test/fixtures/zeebe/mappings/script-task-output-no-name.bpmn';
import unresolvablePathExpressionXML from 'test/fixtures/zeebe/mappings/unresolvable-path-expression.bpmn';

import VariableProvider from 'lib/VariableProvider';

Expand Down Expand Up @@ -474,6 +475,38 @@ describe('ZeebeVariableResolver - Variable Mappings', function() {
});


describe('Unresolvable path expression', function() {

beforeEach(bootstrap(unresolvablePathExpressionXML));


it('should resolve unresolvable path expression as <Any>', inject(async function(variableResolver, elementRegistry) {

// given
const subProcess = elementRegistry.get('SubProcess_1');

// when
const variables = await variableResolver.getVariablesForElement(subProcess);

// then
// cf. https://github.com/bpmn-io/variable-resolver/issues/87
expect(variables).to.variableEqual([
{
name: 'agentContext',
type: 'Any',
info: '=agent.context'
},
{
name: 'agent',
type: 'Any',
info: '=agent'
}
]);
}));
Comment on lines +483 to +505

});


describe('Scope', function() {

beforeEach(bootstrap(scopeXML));
Expand Down
Loading