AnsweredAssumed Answered

Task Event: User is null

Question asked by qwe on Sep 2, 2012
Latest reply on Sep 4, 2012 by naag
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?