Preserve feel expression for unresolvable values#77
Conversation
e26229e to
93952ec
Compare
3f90a03 to
f53631c
Compare
93952ec to
cab9598
Compare
|
@barinali ready for review. Consider if this is really what we need, today - as per standard merging behavior different expressions (can be long ones) will be merged (concatenated via |
There was a problem hiding this comment.
Pull request overview
This pull request enhances the variable resolution system to preserve FEEL expressions for unresolvable variables (those that resolve to Any type) by storing them in the variable#info field. This enables the editor to display the original expression during completion, improving the developer experience.
Changes:
- Preserve FEEL expressions in the
infofield when variables cannot be resolved due to missing references - Add test coverage for merging multiple unresolvable expressions with newline separation
- Update existing test expectations to reflect the new behavior where
infocontains the preserved expression
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lib/zeebe/util/feelUtility.js | Adds logic to preserve FEEL expression in info field when variable becomes Any due to unresolved references |
| test/spec/zeebe/Mappings.spec.js | Adds new test for merging any expressions and updates existing scope test to verify preserved expression |
| test/fixtures/zeebe/mappings/merging.any-expression.bpmn | New test fixture with two tasks outputting to same variable with different unresolvable expressions |
| CHANGELOG.md | Documents the new feature in the unreleased section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ___Note:__ Yet to be released changes appear here._ | ||
|
|
||
| * `FEAT`: preserve expression unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77)) |
There was a problem hiding this comment.
The CHANGELOG entry "preserve expression unresolvable values" could be clearer. Consider rewording to "preserve FEEL expressions for unresolvable values" or "preserve expressions in info field for Any-type variables" to better match the PR title and description.
| * `FEAT`: preserve expression unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77)) | |
| * `FEAT`: preserve FEEL expressions for unresolvable values ([#77](https://github.com/bpmn-io/variable-resolver/pull/77)) |
As discussed today, I think there is still value in demonstrating merged expressions instead of not showing anything. This is, ideally, an intermediate state and I would like it to go in the direction of camunda/camunda-modeler#5697. |
Proposed Changes
As a proposal built on top of #73 this PR preserves FEEL expressions for
Anyvalues, through thevariable#infofield. As a result it is shown during editor completion.As per standard merging semantics different values will appear newline separated, this is covered in d435dec.
Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool