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
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
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...
I just voted for the issue because of the supplied use case (employee's illness).