From c965d3b630a96f36040bfc355cdcd48806ad93f3 Mon Sep 17 00:00:00 2001 From: LaviniaStiliadou Date: Wed, 25 Oct 2023 11:44:07 +0200 Subject: [PATCH] add new option for transformation (#105) * add new option for transformation * Run linter --------- Co-authored-by: Benjamin Weder --- components/bpmn-q/modeler-component/editor/EditorConstants.js | 1 + components/bpmn-q/modeler-component/editor/util/IoUtilities.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/components/bpmn-q/modeler-component/editor/EditorConstants.js b/components/bpmn-q/modeler-component/editor/EditorConstants.js index 46bcdefb..72d79187 100644 --- a/components/bpmn-q/modeler-component/editor/EditorConstants.js +++ b/components/bpmn-q/modeler-component/editor/EditorConstants.js @@ -2,6 +2,7 @@ export const transformedWorkflowHandlers = { NEW_TAB: "Open in new Tab", SAVE_AS_FILE: "Save as File", + INLINE: "Inline", }; // workflow event types dispatched by the EditorEventHandler diff --git a/components/bpmn-q/modeler-component/editor/util/IoUtilities.js b/components/bpmn-q/modeler-component/editor/util/IoUtilities.js index fa6ca2d6..c99c4dde 100644 --- a/components/bpmn-q/modeler-component/editor/util/IoUtilities.js +++ b/components/bpmn-q/modeler-component/editor/util/IoUtilities.js @@ -277,6 +277,9 @@ export async function handleTransformedWorkflow(workflowXml) { case transformedWorkflowHandlers.SAVE_AS_FILE: // save workflow to local file system await saveXmlAsLocalFile(workflowXml, fileName); break; + case transformedWorkflowHandlers.INLINE: + await loadDiagram(workflowXml, getModeler()); + break; default: console.log(`Invalid transformed workflow handler ID ${handlerId}`); }