@AmeyaShetti you should store the process variables as Objects
You should try to use the Typed Variable API .
ObjectValue typedObjectValue = Variables.objectValue(responseObject).create();
runtimeService.setVariable(execution.getId(), "response", typedObjectValue);