-
1. Re: TaskInstance order by in taskList.getTaskInstances() ?
srohanrao Feb 28, 2009 1:30 PM (in response to sal.nic)There is no API for sorting the tasks in JBPM. If you want to sort the tasks you can either hit the database directly and sort the tasks in the query or you can write a comparator to sort the retreived tasks.
-
2. Re: TaskInstance order by in taskList.getTaskInstances() ?
sal.nic Feb 28, 2009 1:35 PM (in response to sal.nic)tanks srohanrao
I feared this answer ;)
salnic -
3. Re: TaskInstance order by in taskList.getTaskInstances() ?
kukeltje Feb 28, 2009 8:13 PM (in response to sal.nic)Why fear? It is a great opportunity to create something and contribute back. And it is not that difficult...
-
4. Re: TaskInstance order by in taskList.getTaskInstances() ?
sal.nic Mar 1, 2009 6:54 AM (in response to sal.nic)Ronald, you have told the truth,
rather than go directly on the database to do this thing just for me, I prefer that I give a suggestion and make it for everyone ... I'm using jbpm 3.2.3 and at this moment I'm in difficult to change it, where to start?
(I'm new in the opensource world). My skills are:
JAVA: OK
DATABASE: OK (pg, oracle, mysql, sqlserver)
HIBERNATE : KO :(
SVN : OK -
5. Re: TaskInstance order by in taskList.getTaskInstances() ?
bradsdavis Mar 2, 2009 6:12 PM (in response to sal.nic)If you wanted to start somewhere for this, I would first understand Hibernate queries. The Task Management Session uses Hibrernate to make this query.
So, here is the Hibernate Query they use to get tasks for a given user:select ti from org.jbpm.taskmgmt.exe.TaskInstance as ti where ti.actorId = :actorId and ti.isOpen = true
See: http://www.hibernate.org/hib_docs/nhibernate/html/queryhql.html
For the hibernate query, see the source from org.jbpm.db.TaskMgmtSession, which calls a query in org/jbpm/db/hibernate.queries.hbm.xml
You could get the Hibernate session from jBPM, and then create a Query off of it, making your appropriate order by.