7 Replies Latest reply on Sep 25, 2009 4:05 AM by kukeltje

    Start time of process instances

    sebastian.s

      Good morning,

      regarding the API I have a question. Why does the HistoryProcessInstance-type which is returned when using methods of the HistoryService contain an attribute with the process start time but the ProcessInstance-type which is returned by findProcessInstanceById() of the ExecutionServer does not?

      My goal is to get the start time of running process instances.

      Bye
      Sebastian

        • 1. Re: Start time of process instances
          sebastian.s

          Can somebody shed some light on this?

          • 2. Re: Start time of process instances
            kukeltje

            Sebastian,

            There are a small number of situations where the hibernate config in relation to the getters and setters in the related classes are not fully correct. This might also be one of those situations. So when reading the info back from the database, not everything is 'set'.

            I have no access to the source right now so cannot check this. Maybe you can do that yourself?

            • 3. Re: Start time of process instances
              sebastian.s

              Thanks for the hint. Just to make sure you understand. I am not missing data in the attributes but the actual attributes.

              • 4. Re: Start time of process instances
                kukeltje

                ok, thanks for clarifying this. If you can see in the source that the methods are in fact missing (or e.g. private) please file a jira issue since I think they should be there.

                • 5. Re: Start time of process instances
                  sebastian.s

                  I am not too familiar with the source code but I took a look. Here's the interface HistoryProcessInstance. Since there is also a state active I suppose you can also access active process instances over this interface?

                  public interface HistoryProcessInstance {
                  
                   /** when the full process instance has come to an end */
                   String STATE_ENDED = "ended";
                  
                   /** when the full process instance is still active */
                   String STATE_ACTIVE = "active";
                  
                   ..
                  
                   /** when the process instance started */
                   Date getStartTime();
                  
                   ..
                  
                  }
                  


                  The interface ProcessInstance just extends Execution:

                  public interface ProcessInstance extends Execution {
                  }
                  


                  I checked and there is no getter or attribute for the start time.

                  So for me this means: When I work with the ExecutionService and a process instance is returned I cannot easily get the start time but I would have to do a query on the HistoryService for this instance to get the start time?

                  If I don't get anything wrong this turns out to be rather a discussion about the API for the development forum than for the users' forum.

                  • 6. Re: Start time of process instances
                    sebastian.s

                    *push*

                    • 7. Re: Start time of process instances
                      kukeltje

                      Correct, from where we are now, it is something for the dev forum.