The TaskMgmtSession class has several methods for finding tasks belonging to "actors" - either individual actors or many at a time.

BUT... is there a way to efficiently find tasks using the values in context variables?

Let me elaborate... I have tasks assigned to users. Each task relates to a Customer (a POJO persistable by Hibernate). I store Customer objects in the ContextInstance associated with each ProcessInstance. jBPM persists my Customer objects and I can examine them later when I retrieve the tasks. So far so good.

Now... I want to list all active tasks, in any process, for a specific customer (e.g. custNumb = 123). Is there an efficient way?

The seemingly inefficient way is to retrieve all active processes, retrieve the ContextInstance, retrieve the variable named "customer" and examine the context to see if the Customer.custNumb == 123.

Define better? Hibernate queries are used anyway, either implemented by 'us' in the context or by you externally. The former has not happened yet (as you can see in the api) thus the latter is still valid

Of course, good point, I'm in my "commercial software" mindset I guess. This is the "That's how we've always done things" sort of thing.

Fair enough, this will certainly be a consideration. Even as far as a decent Use Case, as I have seen in other situations with open source, that the core group seem to find a much better way to implement anyway, but at least to get the ball rolling, this would be something.