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

Modeler 5.5.0 Execution Listeners: Error when input is cleared (Uncaught in Promise) #3303

Closed
Adrian-WDW opened this issue Nov 16, 2022 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Adrian-WDW
Copy link

Adrian-WDW commented Nov 16, 2022

Describe the bug

In a task, when you add an execution listener and set the type to either 'Expression', 'JavaClass' or 'DelegateExpression' and type something in the inputfield beneath, then clear the input with backspace, you get the following error and can't really use the modeler afterwards, so you have to reload/restart.

Uncaught (in promise) TypeError: Ip is not a function or its return value is not iterable
at Sp (index.esm.js:15362:9)
at index.esm.js:15328:18
at Array.map ()
at Op (index.esm.js:15322:22)
at index.esm.js:17231:8
at index.esm.js:16724:63
at Array.map ()
at mu._getGroups (index.esm.js:16724:44)
at index.esm.js:16710:35
at index.esm.js:1626:14

Steps to reproduce

  1. Select an activity
  2. Open 'Execution listeners' by clicking 'create'
  3. Change 'Listener type' to either 'Expression', 'JavaClass' or 'DelegateExpression'
  4. Type something in the inputfield below
  5. Delete your input (by pressing backspace several times or select all and then delete)
  6. Open console (error doesn't show in Modeler Log)

Expected behavior

I should be able to delete my inputs without the modeler to break.

Environment

  • OS: [Windows 10]
  • Camunda Modeler Version: 5.5.0
  • Installed plug-ins: Behaviour was tested without plugins installed

Additional context

No response

@Adrian-WDW Adrian-WDW added the bug Something isn't working label Nov 16, 2022
@marstamm
Copy link
Member

Thank you for reporting this issue. I am able to reproduce it.

Root Cause

The execution listener is persisted as

<camunda:executionListener class="myClass" event="start" />

we use the key (class in this case) to determine the listener type

When the last character is removed, we do not persist the empty string, resulting in

<camunda:executionListener event="start" />

Because the type can no longer be determined, the Property panel breaks

Solution sketch

Persist empty values as empty strings "" for execution listeners

@marstamm
Copy link
Member

Same root-cause, different behavior for DMN implementation:

Recording 2022-11-17 at 17 10 13

@ssternal
Copy link

Thank you guys for the quick response and fix. Do you know when the fix will be incorporated into the Camunda modeler?

@marstamm
Copy link
Member

marstamm commented Nov 18, 2022

Hi @ssternal ,

we are planning on cutting a patch release for the Camunda Modeler next week.

nikku added a commit that referenced this issue Nov 18, 2022
We had to override the existing properties provider to not introduce
breaking changes.

Closes #3304
Closes #3303
@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Nov 18, 2022
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 18, 2022
nikku added a commit that referenced this issue Nov 18, 2022
Override the existing properties provider to not introduce
breaking changes.

Closes #3304
Closes #3303
nikku added a commit that referenced this issue Nov 18, 2022
Override the existing properties provider to not introduce
breaking changes.

Closes #3304
Closes #3303
@nikku
Copy link
Member

nikku commented Nov 19, 2022

Closed via eeab284.

@nikku nikku closed this as completed Nov 19, 2022
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 19, 2022
@nikku
Copy link
Member

nikku commented Nov 21, 2022

Fixed and released with Camunda Modeler v5.5.1.

@nikku nikku added this to the M59 milestone Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants