Long variable displayed wrong (rounded?) in Cockpit

Hello,

we have saved variables of type long as process variables with 18 digits. They are all negative.

The variables are saved correctly in the db in the columns LONG_ and TEXT_ in history and runtime tables, but in variable-tab in the cockpit, the values are shown incorrectly. It’s not possible to find a process instance with the correct value or the displayed value using an equals-operator.

The pattern seems to be the same every time:
-xxxxxxxxxxxxxxxyzzz becomes
-xxxxxxxxxxxxxxxy000 if zzz <= 500
-xxxxxxxxxxxxxxx(y+1)000 else
It seems the numbers get rounded to 1000.

We use Camunda Version 7.9, but found no reference to this issue in the update logs of 7.10 or 7.11

Hi @busca,

when working with big numbers, keep in mind that JavaScript uses the double-precision floating point format when displaying numbers. Your Values seem to be higher than the Max Safe integer.

If those values are IDs, consider storing them as a string.

I hope this clears things up a bit
Martin

1 Like