1 Reply Latest reply on Sep 4, 2006 4:53 AM by hannes

    How to retrieve last taskinstance

    luowp

      Hi, I have a requirement to get the last taskinstance which trigger current one. Here I have taskinstance ID of current active one.

      What I am thinking is get all task instance for this process instance and find out the last end one. That looks not nice.

      Are there any good ideas for this? Thanks!

        • 1. Re: How to retrieve last taskinstance
          hannes

          u could probably get it from the loggin mechanism:
          retrieve the right TaskEndLog; with getTaskInstance() u can get the TI.
          Or u execute directly a HQL Query.
          I am sure that u can also use the API to get the TIs, maybe: processInstance.getTaskMgmtInstance().getTaskInstances()
          (3.0.x)