cancel
Showing results for 
Search instead for 
Did you mean: 

setAuthenticatedUserId

nikmenke
Confirmed Champ
Confirmed Champ

Hi,

i have a question regarding the IdentityService.setAuthenticatedUserId. When is this value used? Just for process starting and querying? Or is it used by another service except the activiti-app?

Thanks,

Niklas

1 ACCEPTED ANSWER

jearles
Star Contributor
Star Contributor

It seems like, as a whole the IdentityService class is meant to perform CRUD operations related to Users and Groups - so, following that, the method 'setAuthenticatedUserId' actually uses the 'org.activiti.engine.impl.identity.Authentication' class to store the userId with this method 'Authentication.setAuthenticatedUserId(authenticatedUserId)'. The only places that this seems to be accessed in the application using a similar getter, are here:

  • Reporting
  • Adding a Comment
  • Creating an Attachment
  • Completing a Task
  • Creating some historical database entries
  • And a few other places pertaining to: variable scoping access, some event logging, users initiating things

If you want to follow up on this and see the occurrences for yourself, check their most up-to-date codebase on Github. All of those occurrences happen in either the activiti-explorer or the activiti-engine.

Hope this helps,
-JEarles

View answer in original post

1 REPLY 1

jearles
Star Contributor
Star Contributor

It seems like, as a whole the IdentityService class is meant to perform CRUD operations related to Users and Groups - so, following that, the method 'setAuthenticatedUserId' actually uses the 'org.activiti.engine.impl.identity.Authentication' class to store the userId with this method 'Authentication.setAuthenticatedUserId(authenticatedUserId)'. The only places that this seems to be accessed in the application using a similar getter, are here:

  • Reporting
  • Adding a Comment
  • Creating an Attachment
  • Completing a Task
  • Creating some historical database entries
  • And a few other places pertaining to: variable scoping access, some event logging, users initiating things

If you want to follow up on this and see the occurrences for yourself, check their most up-to-date codebase on Github. All of those occurrences happen in either the activiti-explorer or the activiti-engine.

Hope this helps,
-JEarles