diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index ed67ddb1989f..bddaa6391418 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -469,7 +469,7 @@ export default { // Load workflow definition this.onWorkflowMessage("Importing workflow", "progress"); loadWorkflow({ id }).then((data) => { - fromSimple(id, data, true, defaultPosition(this.graphOffset, this.transform)); + fromSimple(this.id, data, true, defaultPosition(this.graphOffset, this.transform)); // Determine if any parameters were 'upgraded' and provide message const insertedStateMessages = getStateUpgradeMessages(data); this.onInsertedStateMessages(insertedStateMessages); diff --git a/client/src/components/Workflow/Editor/modules/model.ts b/client/src/components/Workflow/Editor/modules/model.ts index 24a8e1ec9598..36c5eff4e1ad 100644 --- a/client/src/components/Workflow/Editor/modules/model.ts +++ b/client/src/components/Workflow/Editor/modules/model.ts @@ -10,6 +10,14 @@ interface Workflow { steps: Steps; } +/** + * Loads a workflow into the editor + * + * @param id ID of workflow to load data *into* + * @param data Workflow data to load from + * @param appendData if true appends data to current workflow, making sure to create new uuids + * @param defaultPosition where to position workflow in the editor + */ export async function fromSimple( id: string, data: Workflow,