cancel
Showing results for 
Search instead for 
Did you mean: 

Query all Tasks of a Process

didge
Champ in-the-making
Champ in-the-making
Hi

I would like to use Activiti as our new process management system, but one of the requirements of our system is, that it is possible to work on all task.
That means you can edit the current task, add something to an already finished task or write a little note to a task that will start in the future.
I already asked on IRC and someone told me, that BPMN allows only working on the current task.
So my question are:

Are there any technical problems with our approach, that can't be solved?
Is it possible to query and edit all tasks, even those in the future and finished ones?
Or is it possible to change the TaskQuery so this is possible?

I couldn't find the part in the source, where the SQL string is build out of the TaskQuery.

Bye Jens
2 REPLIES 2

jbarrez
Star Contributor
Star Contributor
Indeed, in BPMN a userTask only exists once process execution has arrived in it.

Is it possible to query and edit all tasks, even those in the future and finished ones?
Or is it possible to change the TaskQuery so this is possible?

No, a task exists in the database only when the execution arrived in it. So you can't query them.
Past tasks exist in the historic tables.

But I'm wondering, how does your model look?
Is it possible to have alle the tasks in parallel, which would solve your problem?

I couldn't find the part in the source, where the SQL string is build out of the TaskQuery.

That would be the task.mapping.xml file.

didge
Champ in-the-making
Champ in-the-making
The model looks just like a normal BPMN model, though it's created in our own modeling tool.
All tasks in parallel wouldn't be a solution, because then you can't react on the input of the user or switch to different tasks based on the user decision.

I guess it's to difficult to extend the engine, to create all tasks when the process starts and mark them as unstarted/started/finished?

I would really like to use Activity, as I prefer open source software, the code is very well written and tested (~500 Test for the engine is astonishing!).