From d078892f71670de0ffa7abdd4e25fc7fbae48903 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 00:37:13 +0530 Subject: [PATCH] docs: onGoBack --- server/src/workflow-management/classes/Generator.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/classes/Generator.ts b/server/src/workflow-management/classes/Generator.ts index 5f19e47a..796b64c3 100644 --- a/server/src/workflow-management/classes/Generator.ts +++ b/server/src/workflow-management/classes/Generator.ts @@ -518,7 +518,14 @@ export class WorkflowGenerator { } } - + /** + * Generates a pair for navigating to the previous page. + * This function alone adds the pair to the workflow and notifies the client. + * It's safe to always add a go back action to the first rule in the workflow and do not check + * general conditions for adding a pair to the workflow. + * @param newUrl The previous page's url. + * @returns void + */ public onGoBack = (newUrl: string) => { //it's safe to always add a go back action to the first rule in the workflow this.workflowRecord.workflow[0].what.push({