Can someone confirm me that it is a wrong usage of the REST API or a problem in the REST API starting process instance that not take into account the variable type ?
According to the source code https://github.com/flowable/flowable-engine/blob/flowable-6.3.1/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/form/FormDataResource.java, it seems that the variable type is not taken into account.
The form properties provide a very basic implementation to work with forms. The form definition JSON support we added afterwards is a lot richer and more flexible than form properties.
The behaviour you are seeing is I think correct with how form properties are implemented. The form values are always transformed to string. So when retrieving the process variables the values will be returned as a string. For example the LongFormType can be used to transform the string to the correct Object type -> https://github.com/flowable/flowable-engine/blob/master/modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/LongFormType.java
It’s acceptable to return process variables as string even if it will be better to take advantage of attribute type. But, IMO, the attribute ‘type’ must be used to convert the variable value when creating a process instance.
Do you think the same thing about conversion of the API creating process instance ?