cancel
Showing results for 
Search instead for 
Did you mean: 

When I am trying to create a process instance by passing some variables, where a variable is an array of JSON - I am getting an exception saying that "couldn't find a variable type that is able to serialize" . Any suggestions on this please ?

sudheer_marredd
Champ on-the-rise
Champ on-the-rise

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"

1 ACCEPTED ANSWER

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.

View answer in original post

5 REPLIES 5

daisuke-yoshimo
Star Collaborator
Star Collaborator

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.