Problem with decimal workflow variables in JavaScript expressions. #3765
Invenisso
started this conversation in
Design & tech
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @sfmskywalker, hello Community!
There is a problem with JavaScript expressions in Elsa.
When you reference decimal workflow variable with getVariable(...) it becomes Number (double) in JavaScript.
This way the value can be distorted because of double numbers internal representation. For example 0.1 + 0.2 != 0.3 in JavaScript.
Elsa aims to become a "low-code" platform for non-technical people. Such users will not be aware of the difference between decimal and double. This will lead to subtle hard to find errors, especially when calculating money.
Beta Was this translation helpful? Give feedback.
All reactions