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!
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()