Conversation
Related to #87 Path FEEL expressions like `=agent.context` on an `Any`-typed variable incorrectly resolve as `null` with `Null` type instead of `Any`.
There was a problem hiding this comment.
Pull request overview
Adds a new Zeebe mapping fixture and a corresponding spec to reproduce issue #87, where an unresolvable FEEL path expression (e.g. =agent.context) is currently resolved as null/Null instead of staying Any with the original expression preserved in info.
Changes:
- Add a new BPMN fixture containing an input mapping
=agent.contextand an output mapping=agent. - Add a new test case asserting
agentContextshould be typed asAnyand keepinfo: '=agent.context'.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/spec/zeebe/Mappings.spec.js | Adds a spec case that captures the expected behavior for unresolvable path expressions (issue #87). |
| test/fixtures/zeebe/mappings/unresolvable-path-expression.bpmn | Introduces a minimal diagram fixture to reproduce the unresolvable path expression scenario. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+483
to
+505
| 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' | ||
| } | ||
| ]); | ||
| })); |
Contributor
Author
|
closing this in favor of #98 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #87
Path FEEL expressions like
=agent.contexton anAny-typed variable incorrectly resolve asnullwithNulltype instead ofAny.Proposed Changes
This pull request aims to provide red test coverage for the #87 as there is no test coverage for the reported bug.
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool