cancel
Showing results for 
Search instead for 
Did you mean: 

Search Process Instances by Initiator

sam_a
Champ in-the-making
Champ in-the-making

How can I search for process instances started/created by a particular user? I used the identityService to set the authenticatedUser before creating the instance so that the START_USER_ID_ column in the ACT_HI_PROCINST table is populated. I don't see any obvious way of performing this operation using ProcessInstanceQuery. Appreciate any help.

3 REPLIES 3

bassam_al-saror
Star Collaborator
Star Collaborator

For that you can use HistoricProcessInstanceQuery HistoricProcessInstanceQuery (Activiti - Engine 5.22.0 API) 

Thanks Bassam. My understanding was that the HistoricProcessInstanceQuery can be used only against ended instances and not against active process instances. I need to run the query against active instances.

HistoricProcessInstanceQuery can also be used for unfinished instances as well. To only retrieve unfinished instances use unfinished method HistoricProcessInstanceQuery (Activiti - Engine 5.22.0 API)