Unable to get User who gave the comment from ProcessInstance

Hi,
I am currently using an embedded Camunda engine in a Java EE application and setting the comment using the JAVA API as below.

taskService.createComment(task.getId(), task.getProcessInstanceId(), "some comment");

But when I am retrieving all comments from the processInstance as below ,

taskService.getProcessInstanceComments(task.getProcessInstanceId());

it doesnt show the user who gave that comment.UserID is null.
Any help would be appreciated.

Hi @manoj
I think you might want to use Identity Service for this purpose.
Please review the following links Identity Service and Identity Service API [2]

Hope it helps.
Alex

You need to set authenticatedUserid using identityservice before storing the comments.

identityService.setAuthenticatedUserId(userId);