JBoss Community

Variables from HistoryService are always Strings

created by saig0 in jBPM - View the full discussion

Hi all!

 

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!

Phil

Reply to this message by going to Community

Start a new discussion in jBPM at Community