cancel
Showing results for 
Search instead for 
Did you mean: 

var_type in the act_hi_detail table always 'string'

troy_doty
Champ in-the-making
Champ in-the-making
I am trying to understand why this column's value is always null.  I was hoping that the data type would key off of the FormData's type.  However, even if I have a variable set to a "date", it will insert "string" as the type.  I'm not concerned with the value always going in the text column, but I'd at least like the type column to indicate the actual data type.

Is there a setting I might be missing?  Does this not pull from the form data's type?  If it does not, where does it come from so I can set it appropriately?

Please let me know if there is any other info I can provide.  I am new to Activiti, so perhaps I am missing something simple.

Ultimately I want to be able to get the correct data type from the HistoricVariableUpdates pulled back from the history service.

Thanks!
3 REPLIES 3

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Troy.

Following test shows how variables are handled  in activiti.
https://github.com/Activiti/Activiti/blob/master/modules/activiti-engine/src/test/java/org/activiti/...

There are different types in the type_ column
CustomVariableType
bytes
null
string
long
short
integer
string
date
serializable

Regards
Martin

frederikherema1
Star Contributor
Star Contributor
Can you show us HOW you add the variables to the process (java-code)?

troy_doty
Champ in-the-making
Champ in-the-making
OK, yup.  It was how we were storing them.  Like I mentioned, I am new to this. 😃

Looks like we take a JSON payload which is just a map of Strings to Strings.  So we are storing them all as String objects which I'm assuming Activiti will store as a "string" type.

Thanks for the quick response and sorry for posting such a simple question.