After completing Task A, i will be navigated to Task B, when Task B is loaded this.formOldValues contains firstname and last name as blank. After filling the last name(this is required field), on click of cancel, the values must be blank and navigate to Task A but here i'm facing an error in console as follows
Here I have attached the my process design. Kindly anyone help me out regarding this.
What you are precisely asking is you want the task B to be cancelled using and outcome button called 'cancel' and the token should move back to task A.I see the following needs to be looked upon
1. If Task B has a form and if it has any mandatory fields then the cancel button will not be enabled due to form validator.
2. If you go for 'prevent default' for outcome button ,your token will remain in the same task i.e B.
3. With alfresco default behavior it tries to save the task form data on submit of any outcome button,which needs to be validated in case of mandatory fields.
This should be a generic UI requirement where there is a need to always enable cancel button with mandatory form fields .Please try to explore on unclaiming the task but i doubt if it moves back the token ..
I'm not sure if I understand why you are doing in the code something that APS workflow should be responsible for? You could bring variables from stage to stage if needed, without hacking the form and outcome buttons.
Denys Vuika yes. Onclick of cancel it should cancel that task and erase the entered data then move back to previous task, while doing this from the backend i'm getting that error. So how can I resolve this?