Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get or else Camunda FEEL function is marked as syntax error #3983

Open
1 of 2 tasks
barmac opened this issue Nov 14, 2023 · 15 comments
Open
1 of 2 tasks

get or else Camunda FEEL function is marked as syntax error #3983

barmac opened this issue Nov 14, 2023 · 15 comments
Assignees
Labels
bug Something isn't working channel:support ready Ready to be worked on spring cleaning Could be cleaned up one day

Comments

@barmac
Copy link
Collaborator

barmac commented Nov 14, 2023

Describe the bug

When I choose get or else function from the suggestions, it's marked as syntax error.

Screen.Recording.2023-11-14.at.10.32.47.mov

Steps to reproduce

  1. Start writing get or and notice the suggestion
  2. Hit enter
  3. now this happens

Expected behavior

The expression get or else(variable, defaultValue) should be parsed as:

Expression [0, 35]
  FunctionInvocation [0, 35]
    VariableName [0, 11]
    PositionalParameters [12, 34]
      VariableName [12, 20]
      VariableName [22, 34]

This must be tuned in two places:

Environment

  • OS: [e.g. MacOS 10.2, Windows 10]
  • Camunda Modeler Version: [e.g. 2.0.0]
  • Execution Platform: [e.g. Camunda 7, Camunda 8]
  • Installed plug-ins: [...]

Additional context

The built-in extension function should be provided in the context because it uses keywords.

SUPPORT-19273
SUPPORT-23453
SUPPORT-23592

@barmac barmac added bug Something isn't working channel:support labels Nov 14, 2023
@philippfromme philippfromme added the backlog Queued in backlog label Nov 14, 2023
@philippfromme philippfromme added the ready Ready to be worked on label Nov 14, 2023 — with bpmn-io-tasks
@philippfromme philippfromme removed the backlog Queued in backlog label Nov 14, 2023
@marstamm
Copy link
Member

We could add a quick-fix and add it to the expression context, but that would not solve the underlying issue. We are currently supporting two FEEL engines with different capabilities, but use the same editor tooling for both.

Cf. @nikku comment on Slack: https://camunda.slack.com/archives/GP70M0J6M/p1699970314078889?thread_ts=1699954926.982759&cid=GP70M0J6M

We should try to solve it on the language level. In the long term, we need a decision on how to handle extensions, especially when we want to add a FEEL playground in the modeler experience at one point.

@JeromeiMSA
Copy link

Hi,

The same problem occurs with Camunda Modeler 5.18.0 :

image

But, we can deploy the BPMN diagram on platform 8.3. And the process works correctly.

@barmac
Copy link
Collaborator Author

barmac commented Feb 29, 2024

This has been independently reported by multiple users.

@nikku nikku added spring cleaning Could be cleaned up one day and removed ready Ready to be worked on labels Mar 14, 2024
@nikku nikku added this to the M76 milestone Mar 14, 2024
@nikku
Copy link
Member

nikku commented Mar 14, 2024

Moving to backlog.

@nikku nikku added the backlog Queued in backlog label Mar 14, 2024 — with bpmn-io-tasks
@nikku
Copy link
Member

nikku commented Apr 9, 2024

Let's investigate if this is an easy pick.

@nikku
Copy link
Member

nikku commented May 7, 2024

Did not make it into the M76 milestone.

@nikku
Copy link
Member

nikku commented Jun 5, 2024

I looked into this yesterday and found that there is sensible improvements we could make in the feel-editor:

  • Any declared built-in shall also be available for syntax completion
  • We can make better use of the batteries included in code mirror for retrieving available variables and built-ins.
  • To be considered: Built-ins are a domain, not a library concern; consider to offer the core as part of the library, but make it extensible, i.e. with Camunda built-ins.

@nikku nikku assigned nikku and unassigned barmac Jun 5, 2024
@nikku nikku added ready Ready to be worked on and removed backlog Queued in backlog labels Jun 5, 2024
@nikku
Copy link
Member

nikku commented Jun 5, 2024

@barmac Assigning myself as I'll look into this post release (I have the context still).

nikku added a commit to bpmn-io/feel-editor that referenced this issue Jun 15, 2024
  * You can now provide built-ins (other than Camunda)
    as you instantiate the editor.

chore: simplify internal structure

  * This is a larger rewrite of the inner structure of the tool,
    fixing some longer standing bugs

chore: treat built-ins like special variables

fix: recognize built-ins in the language grammar

  * We properly configure the language based on built-ins provided
    this allows the grammar to recognize `get or else` or other
    bogus built-ins that would otherwise be recognized as language
    constructs

  Related to camunda/camunda-modeler#3983
nikku added a commit to bpmn-io/feel-editor that referenced this issue Jun 15, 2024
  * You can now provide built-ins (other than Camunda)
    as you instantiate the editor.

feat(autocompletion): filter completed built-ins

chore: simplify internal structure

  * This is a larger rewrite of the inner structure of the tool,
    fixing some longer standing bugs

chore: treat built-ins like special variables

fix: recognize built-ins in the language grammar

  * We properly configure the language based on built-ins provided
    this allows the grammar to recognize `get or else` or other
    bogus built-ins that would otherwise be recognized as language
    constructs

  Related to camunda/camunda-modeler#3983
@nikku nikku mentioned this issue Jun 15, 2024
4 tasks
@nikku nikku added the fixed upstream Requires integration of upstream change label Jun 15, 2024 — with bpmn-io-tasks
@nikku nikku removed the ready Ready to be worked on label Jun 15, 2024
@marstamm marstamm modified the milestones: 8.6, M78 Jun 17, 2024
nikku added a commit to bpmn-io/feel-editor that referenced this issue Jun 18, 2024
  * You can now provide built-ins (other than Camunda)
    as you instantiate the editor.

feat(autocompletion): filter completed built-ins

chore: simplify internal structure

  * This is a larger rewrite of the inner structure of the tool,
    fixing some longer standing bugs

chore: treat built-ins like special variables

fix: recognize built-ins in the language grammar

  * We properly configure the language based on built-ins provided
    this allows the grammar to recognize `get or else` or other
    bogus built-ins that would otherwise be recognized as language
    constructs

  Related to camunda/camunda-modeler#3983
@nikku
Copy link
Member

nikku commented Jun 18, 2024

Updating the feel-editor unfortunately does not solve the issue:

image

What I missed is that we'd also need to update our FEEL validation to recognize the get or else built-in.

@nikku nikku added backlog Queued in backlog and removed fixed upstream Requires integration of upstream change labels Jun 18, 2024
nikku added a commit that referenced this issue Jun 18, 2024
fix: recognize `get or else` in FEEL language

  Closes #3983
nikku added a commit that referenced this issue Jun 18, 2024
Recognizes `get or else` in feel-editor as a language extension.

Related to #3983
@marstamm marstamm removed this from the M78 milestone Jun 18, 2024
@nikku nikku added the ready Ready to be worked on label Jun 18, 2024 — with bpmn-io-tasks
@nikku nikku removed the backlog Queued in backlog label Jun 18, 2024
@nloding
Copy link

nloding commented Jul 24, 2024

Adding another user report so priority can be adjusted as needed: https://forum.camunda.io/t/unparsable-feel-expression-is-it-a-bug-in-modeler/53862/

@nikku
Copy link
Member

nikku commented Jul 25, 2024

Thanks. A fix is already work in progress.

@valeriaportolesicamunda
Copy link

Another customer has reported this: SUPPORT-23453

@rtkohl
Copy link

rtkohl commented Sep 16, 2024

Another customer has reported this: SUPPORT-23592.
is there any workaround for this or an estimated date on when this will be fixed? My customer is using 8.5

@nikku
Copy link
Member

nikku commented Sep 16, 2024

We're currently working on supporting this; customers will need to simply upgrade their modelers to the latest version, and may continue to use 8.5 (run-time) to benefit from a fix.

@Eilenn
Copy link

Eilenn commented Dec 12, 2024

Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working channel:support ready Ready to be worked on spring cleaning Could be cleaned up one day
Projects
None yet
Development

No branches or pull requests

9 participants