How can I set START_USER_ID_ column in ACT_HI_PROCINST table through query

Hi,

I would like to set START_USER_ID_ column in ACT_HI_PROCINST table through query. I would like to store the user who initiated the process. Please if someone can help me with the query would be great…

I would also like to fetch this user through query…

Awaiting for a quick response.

Thanks in advance.

Hi,

You can set the current authenticated user id with the following service call:

identityService.setAuthenticatedUserId(“yourUser”);

If you do this before starting the process instance, the user id will be set in ACT_HI_PROCINST table.

We do this as well in the Flowable REST API, see https://github.com/flowable/flowable-engine/blob/master/modules/flowable-rest/src/main/java/org/flowable/rest/security/BasicAuthenticationProvider.java

Best regards,

Tijs

2 Likes

thank you so much for the quick response. It is getting set.

How can I get this START_USER_ID_ value through query for a process Id???

Will this query get the details

identityService.getPotentialStarterUsers(processDefinitionId)

Thank you tijs