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 ?

cancel
Showing results for 
Search instead for 
Did you mean: 
sudheer_marredd
Active Member

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 ?

Jump to solution

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 Solution

Accepted Solutions
sudheer_marredd
Active Member

Re: 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 ?

Jump 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.

View solution in original post

5 Replies
daisuke-yoshimo
Senior Member

Re: 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 ?

Jump to solution
sudheer_marredd
Active Member

Re: 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 ?

Jump to solution

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.

daisuke-yoshimo
Senior Member

Re: 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 ?

Jump to solution

Please share the code that is generating the value of the variable.

Also, please tell me the version of Activiti Engine you are using.

sudheer_marredd
Active Member

Re: 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 ?

Jump to solution

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"
}]

sudheer_marredd
Active Member

Re: 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 ?

Jump 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.

View solution in original post