Searching for tasks by CMMN or BPMN model variables

Hi all,

As the title suggests I’m looking for a way to search for tasks based on value of variables in the parent model (either a Case or a Process).

I’ve found that with the tasks API I can search for tasks based on variables in the process, but tasks in a case with those same variables aren’t being returned. Is there a way that I can search for tasks based on variables in its parent regardless of it being in a Process model or a Case model?

Thanks,
Mitch