-
1. Re: Re-assigning tasks
kukeltje Jan 27, 2010 11:55 AM (in response to kaiweing)1: No, a task can be assigned but not started yet
2: Try the createTaskQuery on the taskService. Not sure if it contains what you want but I think (hope) it does
Cheers,
Ronald
-
2. Re: Re-assigning tasks
kaiweing Jan 27, 2010 12:14 PM (in response to kukeltje)Hello Ronald,
thank you for your quick response!
Regarding your answers:
1. If jBPM makes that difference, then I wonder how I can set or query for that status 'started'. I haven't found anything suitable on taskService. Could you point me to it?
I found a property progress on the task, if you mean that. I suppose I could set and query for that. But the TaskQuery does not allow to filter by that, and I doubt that field is indexed.
2. As I mentioned, I had a look at TaskQuery (and TaskQueryImpl), but the filter for candidates also sets the filter for unassigned.
I need something like "What tasks could I take, if none had an assignee, i.e. what tasks am i a candidate for".
It would be nice if TaskQuery.candidate would only set the candiate filter and one could set the unassigned filter by oneself.
Best regards, Kai
-
3. Re: Re-assigning tasks
kukeltje Jan 27, 2010 3:43 PM (in response to kaiweing)Oops, sorry, missed these last details. Was in a hurry to catch a bus, so did not read everything.
Well, then you could try to get access to the (Db)Session and do a manual query, or simply 'patch' the taskquery and submit an issue for it. The reason that I think this should be in jBPM (maybe even a method on the taskservice later) is that for managers this is also an interesting thing to be able to reassing task in case of sickness... Mention this when reporting the issue (real life sensible usecases always help in getting things prioritized)
Regarding the status, you have to iterate over tasks to indeed (ab)use the progres, or make sure it is indexed, or hope (expect) that if you do this for moderatly sized tasklists, your dbms optimizes the query and uses indexed fields first. I assume that this is not a method that will be used a lot...
-
4. Re: Re-assigning tasks
kaiweing Jan 28, 2010 3:49 AM (in response to kukeltje)Thank you Ronald,
I added an issue for the candidate query here: https://jira.jboss.org/jira/browse/JBPM-2773
Best regards, Kai
-
5. Re: Re-assigning tasks
sebastian.s Jan 28, 2010 6:47 AM (in response to kaiweing)I just voted for the issue because of the supplied use case (employee's illness).