Hello,
I have designed the process as follows
In my html I have written code as follows
In my typescript file of executeOutcome() i have written as follows
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.
Denys Vuika Maurizio Vitale
Thanks & Regards
Amruta Wandakar
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.
Are you sure it is absolutely necessary do that in javascript?
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?
Discussions, help and advice about the Alfresco Development Framework.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.