cancel
Showing results for 
Search instead for 
Did you mean: 

Go to prior task

alfa
Champ in-the-making
Champ in-the-making
Can activiti go to prior task from actual task?

If the response is  affirmative;  How i do it  from the activiti's api?

Best Regards,
7 REPLIES 7

trademak
Star Contributor
Star Contributor
Hi,

The best way to do this is via a normal sequence flow.
So just draw a sequence flow back to the prior task. Then built-in some logic (with an exclusive gateway for example) in which cases the process should go back.

Best regards,

alfa
Champ in-the-making
Champ in-the-making
Many thanks is a great idea, but i need go to prior task by java code. It is posible use runtime?

Best Regars,

trademak
Star Contributor
Star Contributor
Hi,

Maybe you can explain what you're trying to do in more detail and why it's necessary to do it via Java code.

Best regards,

alfa
Champ in-the-making
Champ in-the-making
OK, my problem is:

My flow is unidirectional, I need for administrator users implement the functionality "go to prior task" in a button or similar.

Best regars

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
Admins should *never* influence the flow like that, bad design decision. Managers of a department or some other process functional role could, but that should be modeled in the flow if possible. So a little more detail would still be appreciated.

alfa
Champ in-the-making
Champ in-the-making
OK, I understand, the solution is flow design.

Thanks.

If is posible, i have other question:

How obtain all tasks in a process for list when process is instanciate?

By example, my process "Test" desing is:
      task1->task2->task3
I instanciated the process:

String procId = runtimeService.startProcessInstanceByKey("Test").getId();

I can obtain the list tasks actives:

List<Task> tasks = taskService.createTaskQuery().processDefinitionKey("Prorroga").list();

but, How I can obtain all pendings tasks  my process "Test"?

Cheers,

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
please…. new questions in new topics… much clearer for others