From 4393d95505c58cfd41d67498da493eb63331441e Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Tue, 28 May 2024 23:00:47 +0200 Subject: [PATCH] Add validation before getting workflow in GenerateWorkflowInputAccessors This commit introduces a validation check in the GenerateWorkflowInputAccessors handler before trying to get the workflow. This prevents any potential issues if the workflow execution context is not available or retrievable. The code flow now first attempts to get the workflow execution context and if it's not available, it will return a completed task. --- .../Elsa.CSharp/Handlers/GenerateWorkflowInputAccessors.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/Elsa.CSharp/Handlers/GenerateWorkflowInputAccessors.cs b/src/modules/Elsa.CSharp/Handlers/GenerateWorkflowInputAccessors.cs index d7adc0d31..ae6d3008d 100644 --- a/src/modules/Elsa.CSharp/Handlers/GenerateWorkflowInputAccessors.cs +++ b/src/modules/Elsa.CSharp/Handlers/GenerateWorkflowInputAccessors.cs @@ -18,7 +18,11 @@ public class GenerateWorkflowInputAccessors : INotificationHandler