04-18-2011 10:23 PM
When I call historyService.createHistoricProcessInstanceQuery().list() the process instance 'getStartUserId()' for each resulting instance always returns a null.
04-19-2011 04:45 AM
org.activiti.engine.impl.identity.Authentication.setAuthenticatedUser(…);04-19-2011 05:45 AM
04-20-2011 04:08 AM
04-20-2011 04:30 AM
This is how we currently do it in the webapp: when a new request comes in, we set the authenticated user. When all is done, and the response is sent back, we set null.
04-21-2011 04:10 AM
public void onRequestStart(HttpServletRequest request, HttpServletResponse response) {
// Authentication: check if user is found, otherwise send to login page
LoggedInUser user = (LoggedInUser) getUser();
if (user == null) {
…
} else {
// Set thread-local userid of logged in user (needed for Activiti user logic)
Authentication.setAuthenticatedUserId(user.getId());
}
}
public void onRequestEnd(HttpServletRequest request, HttpServletResponse response) {
Authentication.setAuthenticatedUserId(null);
}
04-21-2011 07:39 AM
04-22-2011 03:09 AM
04-22-2011 03:26 AM
1) yup exactly the same. My bad for using the wrong method.
2) And I indeed meant Filter, not listener !
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.