while creating a process instacne using runtimeService.startProcessInstanceByID(processDefinitionID,processVariableMap) where one of the variable in the map is like below
[{
"taskTitle":"Fund Manager Review",
"FundName":"BlueChip Fund"
}]
I am getting an error like "could not find a variable type to serialize above object"
Solved! Go to Solution.
I resolved this issue by adding a Custom Variable type to the processEngine. In my case It is of JsonType.
Thank you for your inputs.
Does the class that you pass implement java.io.Serializable interface?
Activiti/DefaultVariableTypes.java at 5.x · Activiti/Activiti · GitHub
Activiti/SerializableType.java at 5.x · Activiti/Activiti · GitHub
Thanks for your reply.
Yes... It does implement Serializable.
The other interesting thing is, when i make a REST call with the same payload.. I am able to initiate the process.
but when I use the Java method(runtimeService.startProcessInstanceById()), I am facing the above issue.
Please let me know if you need further info.
Please share the code that is generating the value of the variable.
Also, please tell me the version of Activiti Engine you are using.
daisuke-yoshimoto _ I am using 5.22.0 version of Activiti Community Version.
My Variable is something like this,
My sample variable looks like this,
[{
"taskName": "TestTask",
"taskPriority": "34"
}]
I resolved this issue by adding a Custom Variable type to the processEngine. In my case It is of JsonType.
Thank you for your inputs.
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.