ProcessEngine engine = getProcessEngine();
queryDto.setObjectMapper(getObjectMapper());
VariableInstanceQuery query = queryDto.toQuery(engine);
// disable binary fetching by default.
query.disableBinaryFetching();
// disable custom object fetching by default. Cannot be done to not break existing API
if (!deserializeObjectValues) {
query.disableCustomObjectDeserialization();
}