Cancel functionality in activiti

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Established Member II

Cancel functionality in activiti

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
Highlighted
Senior Member

Re: Cancel functionality in activiti

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

Highlighted
Active Member II

Re: Cancel functionality in activiti

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


Highlighted
Established Member II

Re: Cancel functionality in activiti

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.

Highlighted
Active Member II

Re: Cancel functionality in activiti

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