From 1923a0f7f83f3316c3271b5e20067634b5b24931 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 21 May 2025 11:27:28 +0200 Subject: [PATCH 1/3] Fix conditional logic in stimulus dispatch handlers Added missing braces to improve readability and consistency in conditional statements for stimulus dispatch logic. Ensures better maintainability and alignment with coding standards. --- .../Consumers/DispatchStimulusRequestConsumer.cs | 13 ++++++++----- .../Handlers/DispatchStimulusCommandHandler.cs | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/modules/Elsa.MassTransit/Consumers/DispatchStimulusRequestConsumer.cs b/src/modules/Elsa.MassTransit/Consumers/DispatchStimulusRequestConsumer.cs index b8bb52397..49fe0bc9e 100644 --- a/src/modules/Elsa.MassTransit/Consumers/DispatchStimulusRequestConsumer.cs +++ b/src/modules/Elsa.MassTransit/Consumers/DispatchStimulusRequestConsumer.cs @@ -16,16 +16,19 @@ public class DispatchStimulusRequestConsumer(IStimulusSender stimulusSender, IPa var message = context.Message; var json = message.SerializedRequest; var request = payloadSerializer.Deserialize(json); - - if(request.ActivityTypeName != null) + + if (request.ActivityTypeName != null) { await stimulusSender.SendAsync(request.ActivityTypeName, request.Stimulus!, request.Metadata, cancellationToken); return; } - - if(request.StimulusHash != null) + + if (request.StimulusHash != null) + { await stimulusSender.SendAsync(request.StimulusHash!, request.Metadata, cancellationToken); - + return; + } + throw new InvalidOperationException("Either ActivityTypeName or StimulusHash must be specified."); } } \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Runtime/Handlers/DispatchStimulusCommandHandler.cs b/src/modules/Elsa.Workflows.Runtime/Handlers/DispatchStimulusCommandHandler.cs index 6c3eb66d2..724714596 100644 --- a/src/modules/Elsa.Workflows.Runtime/Handlers/DispatchStimulusCommandHandler.cs +++ b/src/modules/Elsa.Workflows.Runtime/Handlers/DispatchStimulusCommandHandler.cs @@ -11,16 +11,19 @@ public class DispatchStimulusCommandHandler(IStimulusSender stimulusSender) : IC public async Task HandleAsync(DispatchStimulusCommand command, CancellationToken cancellationToken) { var request = command.Request; - - if(request.ActivityTypeName != null) + + if (request.ActivityTypeName != null) { await stimulusSender.SendAsync(request.ActivityTypeName, request.Stimulus!, request.Metadata, cancellationToken); return Unit.Instance; } - - if(request.StimulusHash != null) + + if (request.StimulusHash != null) + { await stimulusSender.SendAsync(request.StimulusHash!, request.Metadata, cancellationToken); - + return Unit.Instance; + } + throw new InvalidOperationException("Either ActivityTypeName or StimulusHash must be specified."); } } \ No newline at end of file From c5d312f04c12e6f146bd8225154785a2149feffe Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 21 May 2025 11:28:39 +0200 Subject: [PATCH 2/3] Update workflow for version 3.4.1 release tracking Increase base_version to 3.4.1 and update branch filtering to match the new patch release naming convention. This ensures the workflow correctly handles the latest release process. --- .github/workflows/packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 9323c4eb5..28c63d94d 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -13,7 +13,7 @@ on: release: types: [ prereleased, published ] env: - base_version: '3.4.0' + base_version: '3.4.1' feedz_feed_source: 'https://f.feedz.io/elsa-workflows/elsa-3/nuget/index.json' nuget_feed_source: 'https://api.nuget.org/v3/index.json' @@ -46,7 +46,7 @@ jobs: run: | if [[ "${{ github.ref }}" == refs/tags/* && "${{ github.event_name }}" == "release" && ("${{ github.event.action }}" == "published" || "${{ github.event.action }}" == "prereleased")]]; then git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* - git branch --remote --contains | grep origin/rc/3.4.0 + git branch --remote --contains | grep origin/patch/3.4.1 else git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* git branch --remote --contains | grep origin/${BRANCH_NAME} From 366284aed1372318c77eb9b3b1d4f323f2e62143 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Wed, 21 May 2025 11:31:58 +0200 Subject: [PATCH 3/3] Updates package versions Updates several package versions to their latest available releases. This ensures that the project benefits from the latest features, bug fixes, and security updates provided by the respective libraries. --- Directory.Packages.props | 116 +++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 9b10f2b7d..c8ae07c79 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,7 @@ - + @@ -23,32 +23,32 @@ - + - - - - - - - - + + + + + + + + - + - + - + @@ -57,24 +57,24 @@ - - - + + + - - + + - - + + - + - - + + @@ -108,11 +108,11 @@ - + - - + + @@ -125,38 +125,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +