Filtering GET /history/task by `rootProcessInstanceId`

Hey folks, I don’t know whether this is the right category. Feel free to correct me.

I am currently evaluating Camunda for a new project and play with the REST api a bit. While running a few test processes I hit a few road blocks that you might be able to help with.

Is it possible to filter /history/task by rootProcessInstanceId? I am having a process that calls another process as an activity. I would like to see all tasks related to the rootProcessInstanceId. I cannot find anything within the docs.

What would be the idiomatic way to go here?

I see these possibilities:

  1. Extend the REST API (I do not see a way to do that right now. Check out source, adjust end-point definition, deploy custom API package? Is there something easier like hooks/advices/plugins?)
  2. Assign a businessKey that is unique for the specific user invoked process (currently I do not use the businessKey as I do not know about the semantics yet. Possibly I use the project id as business key.)
  3. Perform multiple HTTP requests to first fetch alls related process instances and then filtering tasks by their IDs. (This sounds overweight)

I would appreciate some hints on Camunda-fu by a sensei.

Cheers

Hi @leoc,

I would go for your second possibility.

The first one is described here: Embed the API | docs.camunda.org No need to compile everything by yourself, just add your endpoint.

The third option is good for client code. But it depends on the levels of nested subprocesses to value the overload.

Hope this helps, Ingo