I'm using jBPM 4.4 and try to get different variables from an ended process instance with the HistoryService.
The problem is that the HistoryService only get variables with type String. When I try to get a variable with an other type, it transfer the variable into String.
If the variable is a number, I'm able to cast it into number. But in case the variable is a Boolean, I get "T" or "F". And if the variable is a date, it will cast into an unusual format.
It seems that the variable will be transform into String with a toString() method, when the process instance end.
Is this behavior correct? If it is correct, the return type of getVariable() from HistoryService have to change from Object to String.
Thank you for answer!
yes, history variables are always represented as string, and this is correct bahaviour at least for the time being.
I agree that the interface shall be changed.