cancel
Showing results for 
Search instead for 
Did you mean: 

Switching to different workflow task from stage of workflow

kethur
Champ in-the-making
Champ in-the-making
Hi Team,



How do a workflow assignee/candidate swich to different task based on a his selection. 
Example:  There are 5 tasks in a workflow.  when the workflow is in task 2 stage, the assignee
should be able to start the workflow again from task 1 or he can choose to go to stage 4.
Likewise, at any stage the user should be able to swich to any stage.  The workflow should be flexible enough to go to any task from any task.

Thanks,
Raj
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
The use case you describe can be modeled with activiti. However, restarting a workflow of jumping back to any arbitrary task is not something you can do with activiti, rather, you need to model those flows/jump in your BPMN.

For example, if you allow a user to go from "task 2" to either "task 1" or "task 3", you could do this with an exclusive-gateway after task2 which evaluate a certain variable or condition, possibly filled in in "task 2".

kethur
Champ in-the-making
Champ in-the-making
I was thinking the below solution.  May not be a very good solution but, since we want this kind of solution we might have to do this.  Please let me know your thoughts.

Define each task as a separate workflow and provide a form to select the next stage to go to (so, the assignee could select whichever stage he wants to go to) and based on that, invoke that particular workflow which only contains the task and same form values to select next stage.

Any thoughts?

Thanks,
Raj

frederikherema1
Star Contributor
Star Contributor
If your process is so dynamic (that it can't be handled with using exclusive gateways and sequence-flows back/forward to tasks) I guess there is no point of using a workflow-engine. When you use the separate-process approach, there is no "global" state of the process anymore, but rather it's shattered over different independent process-instances (some finished, some not).

kafeitu
Champ on-the-rise
Champ on-the-rise
The use case you describe can be modeled with activiti. However, restarting a workflow of jumping back to any arbitrary task is not something you can do with activiti, rather, you need to model those flows/jump in your BPMN.

For example, if you allow a user to go from "task 2" to either "task 1" or "task 3", you could do this with an exclusive-gateway after task2 which evaluate a certain variable or condition, possibly filled in in "task 2".

Can Ad-Hoc solve this question?

jbarrez
Star Contributor
Star Contributor
Yes, it would. But there is no support yet for that in Activiti… Altough my fingers are itching to do it …