btw, if you would be interesed, I also managed to get to work Commands with command context, which is good in creating custom queries for same query parameters as camunda does, in example TaskQuery, which I needed to alter a little bit.
https://forum.camunda.io/t/custom-mybatis-queries-and-command-context/4187