From 3a6402b2fd0bd1fe5e1cc1569d782dd5d3770332 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 00:38:00 +0530 Subject: [PATCH] feat: navigate to next page --- server/src/workflow-management/classes/Generator.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/src/workflow-management/classes/Generator.ts b/server/src/workflow-management/classes/Generator.ts index 796b64c3..4d91462f 100644 --- a/server/src/workflow-management/classes/Generator.ts +++ b/server/src/workflow-management/classes/Generator.ts @@ -536,5 +536,16 @@ export class WorkflowGenerator { this.socket.emit('workflow', this.workflowRecord); } + + public onGoForward = (newUrl: string) => { + //it's safe to always add a go forward action to the first rule in the workflow + this.workflowRecord.workflow[0].what.push({ + action: 'goForward', + args: [{waitUntil: 'commit'}], + }); + this.notifyUrlChange(newUrl); + this.socket.emit('workflow', this.workflowRecord); + } + }