Cannot find serializer for value 'Untyped value


I get the error:
Cannot find serializer for value ‘Untyped value ‘test.ObjectDTO@4a189a62’, isTransient = false’.

When I try to put the following object on the process as a variable:

package test;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import ObjectTypeEnum;
import java.time.LocalDateTime;
import java.util.List;

public class ObjectDTO {

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime date;
private Long Id;
private List<TestDTO> testDTOList;
public Long getId() {
    return id;
public void setId(Long id) { = id;
public List<TestDTO> getTestDTOList() {
    return testDTOList;
public void setTestDTOList(List<TestDTO> testDTOList) {
    this.testDTOList = testDTOList;
public LocalDateTime getDate() {
    return date;
public void setDate(LocalDateTime date) { = date;


I try with this code:

ObjectDTO objectDTO = new ObjectDTO();
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
RuntimeService runtimeService = processEngine.getRuntimeService();
.setVariable(“someId”, someId)
.setVariable(“anotherId”, anotherId)
.setVariable(“objectDTO”, objectDTO)