This content has been marked as final.
Show 2 replies
-
1. Re: How to get actorId from transitions
rorysteele Aug 2, 2005 5:29 AM (in response to rorysteele)Hi
I should have said this is in JBPM 3 and to correct the code examples slightly:
- the task node does have a inner task element in the XML
- in the first example it returns a null TaskInstance not actorId (then a NullPointerException on getActorId())
- in the second example the list of tasks is empty
Cheers
Rory -
2. Re: How to get actorId from transitions
rorysteele Aug 8, 2005 10:56 AM (in response to rorysteele)I'll answer my own question for those that may come across the same problem...
String query = "select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti "+ "where ti.end is not null and ti.token.id = :tokenId"; .... ExecutionContext context = .... JbpmSession session = JbpmSession.getCurrentJbpmSession(); Query query = session.getSession().createQuery(query); query.setLong("tokenId", context.getToken().getId()); List tasks = query.list(); // so something with tasks session.close();
I'm assuming that the TaskInstance is 'ended' before the transition is taken - would be nice to have access to this functionality via TaskMgmtSession
Rory