0 Replies Latest reply on Nov 10, 2010 9:57 AM by chris does

    How to get all comments of a process Instance

    chris does Newbie

      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