How query process instance in multiple process definition by key?


#1

I have some process definition and all of it key start with “signUpProjectProcess_xxx”.

And I want query process instance on the process definitioins of which key like “signUpProjectProcess” or start with “signUpProjectProcess”.

How can I do it by java api?

Any thouhts ? Thanks you all.


#2

Camunda provieded some java api for do it when query task. But not provieded the java api for query process instance.

taskService.createTaskQuery().processDefinitionKeyIn();
taskService.createTaskQuery().processDefinitionNameLike();

#3

Hi,

You can try:

 runtimeService.createProcessInstanceQuery().processInstanceBusinessKeyLike();

Best regards,
Yana