AnsweredAssumed Answered

identity in a webapp

Question asked by tbee on Sep 4, 2012
Latest reply on Sep 11, 2012 by tbee
So I figured out how to set which user is logged in for the workflow:

processEngine.getIdentityService().setAuthenticatedUserId("kermit");

But this code is running as part of a webapplication, and according to the user guide, "the ProcessEngine and the services objects are thread safe. So you can keep a reference to 1 of those for a whole server." This would mean that all threads / request share the same identity service, and thus that the setAuthenticatedUserId is valid for all threads. But individual requests may be "in the spirit" of different workflow users.

How do I make sure that setAuthenticatedUserId is not influenced by other threads / request and subsequent calls are executed in context of the user set before?

Outcomes