There is a limitation of 20000 for query tasks with variables in org.activiti.engine.impl.persistence.entity.TaskEntityManager
// setting max results, limit to 20000 results for performance reasons
taskQuery.setMaxResults(20000);
taskQuery.setFirstResult(0);
But, we need to query more that 20000 variables.. So, we have to override this class to be able to do our search, which is annoying
Isn't it better to implement this in the way which is configurable? So, user can choose the limitation by themselves.