Currently in the RepositoryService , when you create a ProcessInstanceQuery, you are able to query for ProcessInstances by processDefinitionId and processDefinitionKey, that is to say, you are able to provide just ONE Id or Key. It would be cool to have similar methods but providing a SET of Ids or Keys in order to query for ProcessIntances which are defined by a SET of process definitions (Ids or Keys). I request for this because currently I need to query for all the process Instances with which a user with the given id is involved AND at the same time that process instances are defined by a SET of process definitions with the given keys or Ids. So in order to do that I have to perform a FOR sentence as follows (user id is for instance "jerry"):
List<ProcessInstance> list = new ArrayList<ProcessInstance>();
for(String processDefinitionKey : processDefinitionKeyArray)
And I think is not really nice performing that iteration . I think would be helpful something like this:
List<ProcessInstance> list = RuntimeService.createProcessInstanceQuery().involvedUser("jerry").processDefinitionKeys(processDefinitionKeysArray).list();.
Similarly with process definition Ids.
I hope you can add this feature in the next release, or give me an alternative to do that if you don't mind .
Thanks a lot in advanced.