From a54ff2dc0618f7ab2781e2c22a36e8eedd9a2bed Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 17 Jun 2026 12:06:07 -0400 Subject: [PATCH 1/2] DYN-9707: Fix ForceBlockRun not set on legacy XML workspaces The ForceBlockRun refactor in #17153 wired the forceBlockRun flag through the JSON open path (OpenJsonFile) but missed the legacy XML open path (OpenXmlFileFromPath), leaving ForceBlockRun unset for any .dyn file in old XML format. Fix: add forceBlockRun parameter to OpenXmlFileFromPath and set it on the HomeWorkspaceModel's RunSettings before OpenWorkspace is called, mirroring what the JSON path already does. Co-Authored-By: Claude Sonnet 4.6 (1M context) --- src/DynamoCore/Models/DynamoModel.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index 21fbbcb6c83..7fda91d1766 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -2256,7 +2256,7 @@ internal void OpenFileFromPathCore(string filePath, bool forceManualExecutionMod // When Json opening failed, either this file is corrupted or file might be XML if (ex is JsonReaderException && DynamoUtilities.PathHelper.isValidXML(filePathToOpen, out xmlDoc, out ex)) { - openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode); + openedSuccessfully = OpenXmlFileFromPath(xmlDoc, filePathToOpen, forceManualExecutionMode, forceBlockRun: forceBlockRun); return; } else @@ -2466,7 +2466,7 @@ private void InsertJsonFileFromPath(string fileContents, string filePath, bool f /// execution mode specified in the file and set manual mode /// When true, marks the opened workspace as a template (for example when opened via ). /// True if workspace was opened successfully - private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false) + private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false, bool forceBlockRun = false) { try { @@ -2491,6 +2491,8 @@ private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool force if (OpenXmlFile(workspaceInfo, xmlDoc, out ws)) { ws.IsTemplate = isTemplate; + if (ws is HomeWorkspaceModel homeWs && homeWs.RunSettings != null) + homeWs.RunSettings.ForceBlockRun = forceBlockRun; OpenWorkspace(ws); // Set up workspace cameras here From 0e45272ad43ff188add893730b742a6fd44ec2ea Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 17 Jun 2026 12:15:35 -0400 Subject: [PATCH 2/2] DYN-9707: Add missing XML doc param tag for forceBlockRun Co-Authored-By: Claude Sonnet 4.6 (1M context) --- src/DynamoCore/Models/DynamoModel.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index 7fda91d1766..6a86e847bdf 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -2465,6 +2465,7 @@ private void InsertJsonFileFromPath(string fileContents, string filePath, bool f /// Set this to true to discard /// execution mode specified in the file and set manual mode /// When true, marks the opened workspace as a template (for example when opened via ). + /// Set this to true to block the graph from running after opening. /// True if workspace was opened successfully private bool OpenXmlFileFromPath(XmlDocument xmlDoc, string filePath, bool forceManualExecutionMode, bool isTemplate = false, bool forceBlockRun = false) {