-
-
2. Re: Get finished tasks
cpob Dec 8, 2006 12:14 PM (in response to asmo)You can always just do a hibernate query against the DB
-
3. Re: Get finished tasks
zhongboqing Dec 8, 2006 11:49 PM (in response to asmo)1, you can add the query in the file "org\jbpm\db\hibernate.queries.hbm.xml" ,like
<![CDATA[
select ti
from org.jbpm.taskmgmt.exe.TaskInstance as ti
where ti.actorId = :actorId
and ti.isOpen = true and ti.end is not null
]]>
2, you can add the method findFinishedTaskInstances int the java file "org\jbpm\db\TaskMgmtSession.java"
/**
* get the finished tasllist for a given actor.
*/
public List findFinishedTaskInstances(String actorId) {
List result = null;
try {
Query query = session.getNamedQuery("TaskMgmtSession.findFinishedTaskInstancesByActorId");
query.setString("actorId", actorId);
result = query.list();
} catch (Exception e) {
log.error(e);
jbpmSession.handleException();
throw new JbpmException("couldn't get task instances list for actor '"+actorId+"'", e);
}
return result;
}
3, rebuild the jpdl