10 Replies Latest reply on May 19, 2009 4:27 AM by heiko.braun

    History information

    heiko.braun

      I started working on the reporting for jbpm4 and realized several problems so far:


      instance history doesn't populate the end date & duration.
      And i am not sure how canceled instances should appear here.

      activity history doesn't populate the task assignee.

      process definition / deployment history doesn't exists at all

        • 1. Re: History information
          tom.baeyens

          i'll check the first 2 asap.

          process definition / deployment history doesn't need history info. for those, just use the repository service/schema directly. or am i missing something?

          • 2. Re: History information
            tom.baeyens

            i've created https://jira.jboss.org/jira/browse/JBPM-2261 so that i don't forget

            • 3. Re: History information
              heiko.braun

              How to we deal with canceled process instances or tasks? IMO they should show up in the history as well, with a proper state, i.e. 'canceled'.
              If we only keep successfully ended executions in the history then we loose one important correlation aspect: success/failure ratio.

              • 4. Re: History information
                camunda

                +1!

                And they should influence statistics of the already finished tasks in this instance as well in my opinion

                • 5. Re: History information
                  tom.baeyens

                  i agree cancelled process instances / tasks should also remain in the history.

                  there is a related aspect that I wanted to bring up: I want to split the execution state from the from the user provided end state.

                  currently users can provide a custom end state value. i believe the state of a (history)process instance should always be put to STATE_ENDED. and that we should have a second field indicating the user defined end state. it's the user defined end state that could be cancelled, aborted, error, failure and so on.

                  then i believe users can distinct better between ended processes and active processes in their queries.

                  • 6. Re: History information
                    tom.baeyens

                    Heiko, as for your original request. There is a ProcessInstanceHistoryTest that shows that the start, end dates and duration are filled. If that still fails for you, can you give an indication of how exactly you see this problem ?

                    For the HistoryTaskInstance, i see the problem. The API doesn't allow for accessing that info. Hibernate does know about the actual classes. So it is already possible to write reports for it if you use hibernate queries. Please comment on the jira issue if you need API access.

                    for deployment, i don't see the need for history information. do you ? Also please comment on jira issue

                    https://jira.jboss.org/jira/browse/JBPM-2261

                    • 7. Re: History information
                      camunda

                       

                      Tom wrote:

                      I want to split the execution state from the from the user provided end state.

                      currently users can provide a custom end state value. i believe the state of a (history)process instance should always be put to STATE_ENDED. and that we should have a second field indicating the user defined end state. it's the user defined end state that could be cancelled, aborted, error, failure and so on.


                      I agree and spontaneously I don't see reasons against it.

                      • 8. Re: History information
                        kukeltje

                        I agree as well and even non-spontaneously (meaning I gave it some thought :-P) see no reasons against it.

                        • 9. Re: History information
                          tom.baeyens

                          guys, i realized that we have the end dates in the history as well. so having the end state set to 'ended' would be duplicating information that is already easy queryable.

                          select ..
                          from ...
                          where histProcInst.state = 'ended'
                          
                          ==
                          
                          select ..
                          from ...
                          where histProcInst.end is not null


                          so i'll keep a single state in the history process instance entity.


                          • 10. Re: History information
                            heiko.braun

                            right, user defined end states are implicitly denoted through the end activity already. so we won't needed that either.