Not Able to serialize Custom Java Object

Hello,
I want to set a list of custom Java Object in DelegateExecution but unable to do so. Everytime I got the exception org.camunda.bpm.engine.ProcessEngineException: Cannot serialize object in variable

Thanks,
Ankur Sharma

Hi,

If you set variables to a DelegateExecution the process engine will persist them in database so have to serialize them.
Do you want to serialize it to json or xml? Then you have to use the spin plugin (see https://docs.camunda.org/manual/7.4/user-guide/data-formats/configuring-spin-integration/).
If not all your objects in your List have to implement Serializable otherwise they can not be serialized.

Best regards,

Markus

1 Like

Hi Markus,
This works for me. Thanks for the help.

Regards,
Ankur

Hi @ankur461 what changes did you make to resolve this error?