[jboss-user] [jBPM] - Issue retrieving task comments

Jimmy Smith do-not-reply at jboss.com
Tue Aug 31 09:20:20 EDT 2010


Jimmy Smith [http://community.jboss.org/people/swd_eagle] created the discussion

"Issue retrieving task comments"

To view the discussion, visit: http://community.jboss.org/message/559779#559779

--------------------------------------------------------------
Hi all,

I have a process which enables users to make comments to tasks during various steps in the workflow.

At some point, I need to be able to view all the comments made. This 'point' is also within a task. What I have now is, assuming that taskId is the task in which the process finds itself when it needs to view the history comments:

String executionId = processEngine.getTaskService().getTask(taskId).getExecutionId();

Execution execution = processEngine.getExecutionService().findExecutionById(executionId);


String processInstanceId = execution.getProcessInstance().getId();


List<HistoryDetail> history = processEngine.getHistoryService().createHistoryDetailQuery()                                     
.processInstanceId(processInstanceId).comments().orderDesc(HistoryDetailQuery.PROPERTY_TIME).list();

This always returns an empty array, even though there are definitely comments made to previous steps in the workflow. I can verify that by examining the database. Trace code shows the processInstanceId to be what I expect it to be, but for some reason the History comments can't be retrieved.

What's the correct way of doing it? Ie, getting all comments that was made on all tasks that were in the same process instance of a given task?

Thanks!

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/559779#559779]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100831/5b0142a0/attachment-0001.html 


More information about the jboss-user mailing list