From da5f557d131ccbab6fa1984b3571b0da61aa673a Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Wed, 5 Jun 2024 04:29:55 +0530 Subject: [PATCH] feat: subscribe to pause event --- server/src/workflow-management/classes/Interpreter.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/src/workflow-management/classes/Interpreter.ts b/server/src/workflow-management/classes/Interpreter.ts index 1fa9d60e..d7b5212a 100644 --- a/server/src/workflow-management/classes/Interpreter.ts +++ b/server/src/workflow-management/classes/Interpreter.ts @@ -74,4 +74,15 @@ export class WorkflowInterpreter { this.socket = socket; } + /** + * Subscribes to the events that are used to control the interpretation. + * The events are pause, resume, step and breakpoints. + * Step is used to interpret a single pair and pause on the other matched pair. + * @returns void + */ + public subscribeToPausing = () => { + this.socket.on('pause', () => { + this.interpretationIsPaused = true; + }); + } }