ProcessBusinessKey support in HistoricTaskInstanceQuery

Process instances and their sub process instances are often connected by a shared BusinessKey. That makes it possible to find all process instances that belong together.

Unfortunately it is not possible (as far as I can see) to use the BusinessKey as a filter criteria in the HistoricTaskInstanceQuery. That makes it unnecessary complicated to request all Tasks that belong to a process instance and its sub process instances. By now you first have to search all process instances with the BusinessKey and than iterate to find the tasks that belong to these process instances.

Did I miss something? Is there some simple solution to get all the tasks of a processInstances including sub process instances?

If not I consider to open a enhancement request.

Hi Franz,

you’re right currently this is only possible for running tasks, see TaskQuery#processInstanceBusinessKey.
I created an feature request for this (CAM-7785).

Do you want to provide a pull request for this?

Greets,
Chris

Hi Christopher,

my skills to provide Camunda pull requests are currently limited to documentation typos only :grin:
I may have a look into this but rather not really expect it.

Thanks for creating the feature request.

Regards,
Franz

Hi @FrVaBe,

This feature is now available within new [7.8.0-alpha2]((http://blog.camunda.org/post/2017/07/camunda-bpm-780-alpha2-released/) release and it will be part of the upcoming 7.8.0 release.

Best regards,
Yana