Task Event: User is null

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2012 06:17 AM
Hi,
I have a problem, which should be simple to solve, but i can't find the method to call to solve this problem:
My problem is, that every Task Event (org.activiti.engine.task.Event) returnes null by calling Event.getUserId();
If I take a look into the database I see that the database table ACT_HI_COMMENT has null as value for the column USER_ID_ for every row.
I generate these TaskEvents programmatically by calling (for example)
I guess there is a simple method that I must call to solve this problem, something like processEngine.setCurrentUser(authenticatedUser.getId());
Any suggestions?
I have a problem, which should be simple to solve, but i can't find the method to call to solve this problem:
My problem is, that every Task Event (org.activiti.engine.task.Event) returnes null by calling Event.getUserId();
If I take a look into the database I see that the database table ACT_HI_COMMENT has null as value for the column USER_ID_ for every row.
I generate these TaskEvents programmatically by calling (for example)
processEngine.getTaskService().addComment(task.getId(), null, commentMessage);processEngine.getTaskService().addUserIdentityLink(task.getId(), user.getId(), IDENTITY_LINK_OBSERVER);
I guess there is a simple method that I must call to solve this problem, something like processEngine.setCurrentUser(authenticatedUser.getId());
Any suggestions?
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2012 02:01 AM
Hi qwe,
try this:
try this:
processEngine.getIdentityService().setAuthenticatedUserId(…);
processEngine.getTaskService().addComment(task.getId(), null, commentMessage);
