cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically control the flow

prasanna_bits
Champ in-the-making
Champ in-the-making
Hi,

We in Cisco have a use-case where we need to add implicit links from every task to an initial custom task.
When user decides, use case requires that the current active instance's state is now reset to force a particular task being active and the follow up tasks remain not executed.

start–>task1–>task2–>task3–>task4–>task5–>end

instance1 - task3 is active and when the user interrupts, the control now goes to task2 and makes task2 active and task3 execution details are removed on the same instance1 and for *tracking* reason we do not want to destroy instance1 and create a new instance.
We do not want the backarrows from every task (task3, task4) into task2, this needs to be implicit.

0. Does this even makes sense to achieve in Workflow engines, specifically in activiti?
1. What is the best way to do such a scenario in Activiti?
2. Could you point to some Engine APIs which can help in getting this done?

Thanks a lot for your time
Prasanna Rajaperumal
5 REPLIES 5

trademak
Star Contributor
Star Contributor
Hi,

I don't understand you use case fully, but I don't think this is supported in Activiti.

Best regards,

m2spring
Champ in-the-making
Champ in-the-making
Here's another way to look at this use case:
Let's say we have a workflow with 20 tasks.
We have an instance of this workflow with 18 already completed tasks.
Now, user realizes there's a mistake in task 17.
He would like to reset the workflow instance state back to when 17 became active, so he can redo only 17.
That way he wouldn't need to start completely from the beginning with the downside of having to redo 16 tasks.

It's a bit like an "undo" operation in an editor.
Or, like stepping back in a debugger.

Since this a workflow instance is basically just some state in the database, it could be implemented through snapshotting in the database (probably not the best way to implement it).

I could imagine the workflow engine API to provide such a "step back" operation
Then a larger workflow system could expose this operation through its user interface.

-Max

trademak
Star Contributor
Star Contributor
Hi,

Undo-ing is not supported. It's not just the task itself that needs to be opened again, but also the execution instance of the process needs to be reverted to the position of the task.

Best regards,

m2spring
Champ in-the-making
Champ in-the-making
Hi Tijs,
it's OK, if it's not supported so far.
Do you think this is a valid use case?
Regards,
-Max

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Max,

Please search a little in the forum about previous, identical questions. Maybe even search the (old) jBPM forum etc… Compare it e.g. to an invoice that you alredy sent via snail mail. You can only undo that by sending an correction invoice. Also something that you model in the process. So the functional usecase is valid. Making it a technical implementation is not. Ad-Hoc task management is better suited for these kinds of 'processes'.