JBoss Community

How to get all comments of a process Instance

created by chris does in jBPM Development - View the full discussion

Hi everybody,

 

is it possible to get all the comments of a process instance. (That means every comment of a task within a process instance).

 

I just found the history Service but that didn't work.

 

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

 

I think another solution would be to iterate over all tasks of a process instance to get the comments.

Is there a better solution for this problem?

 

Best Regards,

 

Chris

Reply to this message by going to Community

Start a new discussion in jBPM Development at Community