9 Replies Latest reply on Apr 30, 2010 9:09 PM by rebody

    how to trace activity?

    lokr

      Hello,

      I'd like to know if  ther is a way to trace the path taken by a process instance?

      I made something that polls every second the database with findActivityNames(), but it has its limits, because I can't see the activities that are too fast for me to see it.

       

      By example, is there a "big event-listener" able to trace when the process instance change of node...

       

      Thanks by advance by your answers

        • 1. Re: how to trace activity?
          rebody

          Hi Manuel,

            Now, jBPM 4 only records history for TaskActivity, StateActivity and DecisionActivity.  If you want to trace the Automatic Activity's performance, the jBPM 4 didn't provide history datas for this.  You have to store that information by yourself.

           

            And there are already many tools for analyse this.  Maybe you can try Pref4j.

           

            I think the aim of jBPM 4's history datas is used to tell how long a step had wait, not how long a program had cost

          • 2. Re: how to trace activity?
            swiderski.maciej

            Hi,

             

            In general, personally I think that to get that information you should query history tables instead of execution. That will give you quite good set of information about your process instance execution path.

             

            I think that jBPM saves information for all activity types in history. To illustrate this please take a look at attached screen shots of a bit modified BPM console and a process. Here I used following activity types:

            - java

            - state

            - decision

             

             

            HTH

            Maciej

            • 3. Re: how to trace activity?
              rebody

              Hi Maciej,

                I cannot find any history operation in JavaActivity both in jBPM 4.3 and jBPM 4.4 SNAPSHOT.  And in my current poject, I cannot find history record of AutomaticActivity.  Could you show me some clue to store history records for AutomaticActivity?  Thank you very much.

              • 4. Re: how to trace activity?
                swiderski.maciej

                Hi,

                 

                I am not sure what you mean by history operations?!

                 

                What I meant was that history information (such as start and end dates, duration) are stored for all activities. So you can get complete execution path and some details about it for process instance.

                 

                Cheers,

                Maciej

                • 5. Re: how to trace activity?
                  rebody

                  Hi Maciej,

                   

                    PVM doesn't record activity start and end history information automaticly.  If an Activity want to store its history information, it have to call 'execution.historyActivityStart()' by itself.  And there are only three activities in jPDL do this.  Decision, Task and State.  So I can only see these three activities history records in database.

                  • 6. Re: how to trace activity?
                    swiderski.maciej

                    I am not sure that this is the case. Since as you can see I can get all that information (start, end dates) for all activities without additional setups for my process instance. See attachments for my previous posts.

                     

                    /Maciej

                    • 7. Re: how to trace activity?
                      rebody

                      Hi Maciej,

                       

                        I will go back and recheck whether bpm-console do these job.  Thank you.

                      • 8. Re: how to trace activity?
                        swiderski.maciej

                        It is not bpm-console job, I just placed it there to visualize what kind of information you could get from jBPM.

                         

                        I just did a check and all automatic activities are recorded. You can find it in JpdlAutomaticActivity class.

                         

                        Cheers,

                        Maciej

                        • 9. Re: how to trace activity?
                          rebody

                          HI Maciej,

                            Thank you for your help.  I found it. Thanks.