On click of an outcome how to avoid saving data?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2018 06:00 AM
Hello,
I have process with three task, in the first task i will enter the full name and submit it will go to next task that is second. the second task just displays the full name using display value, here i have edit outcome which takes to next task that is third. In the third task i will display full name using text box, here i have cancel outcome if changed full name different value with exiting value, when i click on cancel outcome the changes should not be saved just move to second task.
Anyone suggest me solution.
Thanks & Regards
Amruta Wandakar
Labels:
- Labels:
-
Alfresco Process Services
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2018 08:53 AM
I found my solution as follows
private cancelFormValues: FormModel;
formOldValues: any;
onFormLoaded(event) {
this.formOldValues = JSON.stringify(event.values);
this.formOldValues = JSON.parse(this.formOldValues);
}
if (event._outcome.name.toLowerCase() === "cancel") {
event.preventDefault();
this.cancelFormValues = new FormModel();
this.cancelFormValues = this.formOldValues;
this.formService
.completeTaskForm(this.currentTaskId, this.cancelFormValues, event._outcome.name)
.subscribe(
() => {
this.taskList.reload();
},
error => { alert(error); }
);
}
