9 Replies Latest reply on Mar 8, 2010 7:57 AM by Maciej Swiderski

    Perhaps a bug in createHistoryActivityInstanceQuery when process has a fork

    Robert Moskal Newbie

      Greetings:

       

      I've been experimenting with process with forks.  If I execute such a process from beginning to end, and then execute an activity query only certain nodes come back (the ones that aren't on the forked execution path). So if I have a process that looks like this:

       

                                  state2

                                 /         \

      start - state1 -- fork          /  join - state4 - end

                                  \state3

       

      Only state1 and state4 come back when I query like this:


      historyService.createHistoryActivityInstanceQuery().executionId(processInstance.getId()).list()

       

      I can find state2 and 3 if I justquery on the activity, but they have a different execution id.  Attached is a unit test that follows the form of the JBPM ones.  It shows all these behaviors.

       

      Is tis a bug, or am I just misunderstanding the way to get the history for a process?  I originally saw this behavior with 4.1, but have also tested with 4.4.