cancel
Showing results for 
Search instead for 
Did you mean: 

Cancel functionality in activiti

mdtabrezmca
Star Contributor
Star Contributor

I have a simple  process with three task  first task(t1) has  save and complete button second task has a form with two fileds f1 and f2 where f1 is mandatory. I have two outcomes on this form submit and cancel, submit will take me to the next task(t3) where as cancel should take me to task(t1). When i am trying to click cancel i dont want the current form to be submitted but token should move back to task(t1).

Bassam Al-Sarori‌, Ciju Joseph‌, Mauricio Salatino Need your help on the above issue. This can be a general task cancel issue.

4 REPLIES 4

salaboy
Star Collaborator
Star Collaborator

Just add a gateway to deal with that logic, "moving the token" back is more like a hack, do it in the BPMN way. 

mauriziovitale
Confirmed Champ
Confirmed Champ

As Mauricio said you can use a gateway and 2 conditions flow based on the outcomes.
Process definition

Task 3 condition flow
Task 3 condition flow

Task 1 condition flow
task 1 condition flow


Hi Maurizio Vitale,

  

    Thanks But if you see my orignal post where i am mentioning that task if task(t2) has mandatory fields it will throw error that form has mandatory fileds. since task(t2) will try to submit the form(and is same for all the task where on any outcome button it will try to submit the form). Ideally we should have some cancel outcome button same as 'Save' and 'Complete' default out come button.

    Please correct my understanding if i am wrong.

I see your point. You are not able to click on the cancel button if there are required fields not filled out.

Honestly, I don't know if this is considered a bug or something to improve on the activiti side (Bassam Al-Sarori Mauricio Salatino) but once the required fields are filled out you are able to click on the cancel button to go back to the previous task