cancel
Showing results for 
Search instead for 
Did you mean: 

START_USER_ID

feroz1
Champ in-the-making
Champ in-the-making
Hi,
When starting a process instance using businessProcess.startProcessByKey(processDefinitionKey), how can I set the user that instantiated the process? Right now, it's setting the START_USER_ID field in the ACT_HI_PROCINST table value to blank. Activiti explorer shows only the process instances that are instantiated by the current user logged in. So, when the database field value is blank, explorer won't show the process instance for any user.

Thanks in advance.
Feroz.
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
You need to set the Authentication.setAuthenticatedUserId() before you make the process instance start call. Dont forget to remove it afterwards (it's a threadlocal field)