I am getting some strange behaviour in my forms with the serialization/deserialzation from BigDecimal.
Firstly my process kicks off via some Java code, and I create a custom object that has amongst it some BigDecimal properties (class is generated off a swagger spec.)
When I look at the variable via the variable inspector, sure enough, there it is:
As you can see the type is numeric.
Then I display it on an embedded form and change the value and complete the task. Viewing it again in the variable inspector I see:
As you can see it has been converted to a string representation.
However the process carries on as usual, and doesn’t seem to make a fuss
But when I change the value to something like:
"amountFinanced": "443 649",
(Notice the space) I get:
Caused by: spinjar.com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.math.BigDecimal` from String "443 649": not a valid representation
And I understand why, however my question is how to I intercept this to make sure all numeric fields can be deserialised with spaces? The issue is having a space in the number is a perfectly legal thing to do in my country.
It seems strange that Camunda will legally let me store this number but not retrieve “use” it in Java
What is the best way to tackle this problem?