From 1e84773c3bb156655dfd3e19bee9c6476c030a32 Mon Sep 17 00:00:00 2001 From: karishmas6 Date: Sat, 8 Jun 2024 00:22:24 +0530 Subject: [PATCH] feat: update workflow file --- .../workflow-management/classes/Generator.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/server/src/workflow-management/classes/Generator.ts b/server/src/workflow-management/classes/Generator.ts index 926336c8..0fc52fdf 100644 --- a/server/src/workflow-management/classes/Generator.ts +++ b/server/src/workflow-management/classes/Generator.ts @@ -402,5 +402,21 @@ export class WorkflowGenerator { return copy; }; - + /** + * Enables to update the generated workflow file. + * Adds a generated flag action for possible pausing during the interpretation. + * Used for loading a recorded workflow to already initialized Generator. + * @param workflowFile The workflow file to be used as a replacement for the current generated workflow. + * @returns void + */ + public updateWorkflowFile = (workflowFile: WorkflowFile, meta: MetaData) => { + this.recordingMeta = meta; + const params = this.checkWorkflowForParams(workflowFile); + if (params) { + this.recordingMeta.params = params; + } + this.workflowRecord = workflowFile; + } + + }