Activiti Engine: Task Event - User is null

Posted by sockeqwe on Stack Overflow See other posts from Stack Overflow or by sockeqwe
Published on 2012-09-03T15:37:11Z Indexed on 2012/09/03 15:37 UTC
Read the original article Hit count: 164

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about java

Related posts about activiti