cancel
Showing results for 
Search instead for 
Did you mean: 

Tasks creation

tizo
Champ in-the-making
Champ in-the-making
Hi there,

We have been using Activiti for some months now. We have never faced the following situation, but we know that we will to really soon (we are using Activiti as the basis of our system, which is growing a lot): a user realized that has committed a mistake in a task that is already completed. He/she wants us (the managers) that let him/her do the task again. For that, we would like to delete the actual task instance (thinking in a single execution workflow), and create a new task instance of another task (something like "rewind" the workflow).

As we have seen in the API, we could use the method "TaskService.deleteTask" to delete a task, but we couldn't see one to create a new task on the same process. So the question is about the best way to resolve this. Is there any method in the API that could help us to do that?. Or maybe can this be done in one of the Activiti web applications like Activiti Explorer, Cycle, etc?. Or perhaps we should insert a new row directly in the DB to create the new task (in table act_ru_task)?.

Thanks very much.
3 REPLIES 3

tizo
Champ in-the-making
Champ in-the-making
No ideas?

andregs
Champ in-the-making
Champ in-the-making
There's no rewind, afaik, and that would be not easy to implement, since the following tasks probably depends on wrong data (variables) produced by the task that you want to cancel.

The unique safe way of rewind, in my opinion, would be the cancelling of anything that happened after the target task.

In real world, when an employee makes a mistake, e.g. when he sends an inconsistent document for approval, then he has to perform a whole process to fix that mistake, like calling the approver, maybe asking to suspend an order until the fixed document arrives, etc. So, I think you better try to design that as a whole new process…

tizo
Champ in-the-making
Champ in-the-making
The unique safe way of rewind, in my opinion, would be the cancelling of anything that happened after the target task.

Of course, I am willing to do that. But what would be the meaning of cancel a task that already has been done?. Because I am talking about a single execution process, so there is only one task waiting to be done. Maybe what you are saying has much more sense in a multi execution process. In any way, I think that the administrators should have an option to make a new task, because they would cancel the appropriate tasks and delete the appropriate variables before making this new one; as you may note, I am not saying that the whole "rewind" thing should be automatic, just that there should be a way for administrators to create a task in a process (or execution).