From b0a142d8f6dac5b06f9d4bc210f1c94dab1ea62f Mon Sep 17 00:00:00 2001 From: herblinernexxbizz <125579511+herblinernexxbizz@users.noreply.github.com> Date: Tue, 6 Jun 2023 20:21:59 +0200 Subject: [PATCH] update model (with connections) on change activity Id (#4108) --- .../src/modules/flowchart/flowchart.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx b/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx index d6f7f34ce..5213733b4 100644 --- a/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx +++ b/src/designer/designer_packages/elsa-workflows-designer/src/modules/flowchart/flowchart.tsx @@ -208,8 +208,10 @@ export class FlowchartComponent { nodeShape.activity = activity; // If the ID of the activity changed, we need to update connection references (X6 stores deep copies of data). - if (activityId !== originalId) + if (activityId !== originalId) { this.syncEdgeData(originalId, activity); + await this.updateModel(); + } // Update ports. if (args.updatePorts) { @@ -241,8 +243,10 @@ export class FlowchartComponent { node.activity = activity; // If the ID of the activity changed, we need to update connection references (X6 stores deep copies of data). - if (activity.id !== originalId) + if (activity.id !== originalId) { this.syncEdgeData(originalId, activity); + await this.updateModel(); + } } @Method()