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

[BUG] Variable API throws BadRequest when type mismatch #6193

Closed
jeanbaptistedalle opened this issue Dec 9, 2024 · 3 comments · Fixed by #6207
Closed

[BUG] Variable API throws BadRequest when type mismatch #6193

jeanbaptistedalle opened this issue Dec 9, 2024 · 3 comments · Fixed by #6207
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jeanbaptistedalle
Copy link
Contributor

Description

Set variable to a value that doesn't match his definition will success but the instance will not be displayed correctly.

Steps to Reproduce

  1. Create a workflow with some variables, like a variable called "Var1" of type Int32.
  2. In a javascript activity, set this variable with some value that doesn't match the type. For our business case, that could happend when the data I got from elsewhere are not as I expected.
  3. Run the workflow. It will run successfully.
  4. Try to display the instance, the variable API will throw a badrequest exception and the instance will not be successfully display.

Screenshots

Record.2024-12-09.141950.mp4

Expected Behavior

I'm not sure what is the good way to fix it. The variable API result seems to be correct : the type mismatch with the value. But the instance is successfull and then cannot be display. Maybe that's more when the variable is set that a failure should happend to let user see the type mismatch in the variable instance ?

@jeanbaptistedalle jeanbaptistedalle added the bug Something isn't working label Dec 9, 2024
@sfmskywalker sfmskywalker moved this to Triage in ELSA 3 Dec 12, 2024
@sfmskywalker sfmskywalker moved this from Triage to Todo in ELSA 3 Dec 12, 2024
@sfmskywalker sfmskywalker moved this from Todo to In Progress in ELSA 3 Dec 12, 2024
@sfmskywalker sfmskywalker self-assigned this Dec 12, 2024
@sfmskywalker sfmskywalker added this to the Elsa 3.3 milestone Dec 12, 2024
@sfmskywalker
Copy link
Member

Short term, at the very least, we should make sure the designer / workflow instance viewer doesn't break. Mid-term, perhaps the activity should fault.

@sfmskywalker
Copy link
Member

PS. Nice catch 👍🏻

@sfmskywalker
Copy link
Member

Fixed via #6207

@github-project-automation github-project-automation bot moved this from In Progress to Done in ELSA 3 Dec 12, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants