diff --git a/Directory.Packages.props b/Directory.Packages.props
index 3758682dd..0f9791acc 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -126,47 +126,47 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs
index 1f2617642..aee6fb0c9 100644
--- a/src/apps/Elsa.Server.Web/Program.cs
+++ b/src/apps/Elsa.Server.Web/Program.cs
@@ -89,7 +89,7 @@ const PersistenceProvider persistenceProvider = PersistenceProvider.EntityFramew
const bool useDbContextPooling = false;
const bool useHangfire = false;
const bool useQuartz = true;
-const bool useMassTransit = true;
+const bool useMassTransit = false;
const bool useZipCompression = false;
const bool runEFCoreMigrations = true;
const bool useMemoryStores = false;
@@ -98,7 +98,7 @@ const bool useKafka = false;
const bool useReadOnlyMode = false;
const bool useSignalR = false; // Disabled until Elsa Studio sends authenticated requests.
const WorkflowRuntime workflowRuntime = WorkflowRuntime.Distributed;
-const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.MassTransit;
+const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.Memory;
const MassTransitBroker massTransitBroker = MassTransitBroker.Memory;
const bool useMultitenancy = false;
const bool useTenantsFromConfiguration = true;
diff --git a/src/apps/Elsa.Server.Web/appsettings.json b/src/apps/Elsa.Server.Web/appsettings.json
index 91735a81b..a617ec190 100644
--- a/src/apps/Elsa.Server.Web/appsettings.json
+++ b/src/apps/Elsa.Server.Web/appsettings.json
@@ -44,7 +44,7 @@
},
{
"Id": "tenant-1",
- "Name": "Tenant 12 dd",
+ "Name": "Tenant 1",
"Configuration": {
"Http": {
"Prefix": "/tenant-1",
diff --git a/src/common/Elsa.Mediator/Channels/CommandsChannel.cs b/src/common/Elsa.Mediator/Channels/CommandsChannel.cs
index 43a8b98b0..f80bbdbaa 100644
--- a/src/common/Elsa.Mediator/Channels/CommandsChannel.cs
+++ b/src/common/Elsa.Mediator/Channels/CommandsChannel.cs
@@ -1,9 +1,10 @@
using Elsa.Mediator.Abstractions;
using Elsa.Mediator.Contracts;
+using Elsa.Mediator.Middleware.Command;
namespace Elsa.Mediator.Channels;
///
-public class CommandsChannel : ChannelBase, ICommandsChannel
+public class CommandsChannel : ChannelBase, ICommandsChannel
{
}
\ No newline at end of file
diff --git a/src/common/Elsa.Mediator/CommandStrategies/BackgroundStrategy.cs b/src/common/Elsa.Mediator/CommandStrategies/BackgroundStrategy.cs
index e99a0a1b0..8d4210e05 100644
--- a/src/common/Elsa.Mediator/CommandStrategies/BackgroundStrategy.cs
+++ b/src/common/Elsa.Mediator/CommandStrategies/BackgroundStrategy.cs
@@ -13,7 +13,7 @@ public class BackgroundStrategy : ICommandStrategy
public async Task ExecuteAsync(CommandStrategyContext context)
{
var commandsChannel = context.ServiceProvider.GetRequiredService();
- await commandsChannel.Writer.WriteAsync(context.Command, context.CancellationToken);
+ await commandsChannel.Writer.WriteAsync(context.CommandContext, context.CancellationToken);
return default!;
}
}
\ No newline at end of file
diff --git a/src/common/Elsa.Mediator/CommandStrategies/DefaultStrategy.cs b/src/common/Elsa.Mediator/CommandStrategies/DefaultStrategy.cs
index 9b204332f..a1e26aa79 100644
--- a/src/common/Elsa.Mediator/CommandStrategies/DefaultStrategy.cs
+++ b/src/common/Elsa.Mediator/CommandStrategies/DefaultStrategy.cs
@@ -12,7 +12,8 @@ public class DefaultStrategy : ICommandStrategy
///
public async Task ExecuteAsync(CommandStrategyContext context)
{
- var command = context.Command;
+ var commandContext = context.CommandContext;
+ var command = commandContext.Command;
var cancellationToken = context.CancellationToken;
var commandType = command.GetType();
var handleMethod = commandType.GetCommandHandlerMethod();
diff --git a/src/common/Elsa.Mediator/Contexts/CommandStrategyContext.cs b/src/common/Elsa.Mediator/Contexts/CommandStrategyContext.cs
index d0e395063..9c4c9a640 100644
--- a/src/common/Elsa.Mediator/Contexts/CommandStrategyContext.cs
+++ b/src/common/Elsa.Mediator/Contexts/CommandStrategyContext.cs
@@ -1,12 +1,13 @@
using Elsa.Mediator.Contracts;
+using Elsa.Mediator.Middleware.Command;
namespace Elsa.Mediator.Contexts;
///
/// Represents a context for executing a command.
///
-/// The command to execute.
+/// The command context to execute.
/// The command handler.
/// The service provider to resolve services from.
/// The cancellation token.
-public record CommandStrategyContext(ICommand Command, ICommandHandler Handler, IServiceProvider ServiceProvider, CancellationToken CancellationToken = default);
\ No newline at end of file
+public record CommandStrategyContext(CommandContext CommandContext, ICommandHandler Handler, IServiceProvider ServiceProvider, CancellationToken CancellationToken = default);
\ No newline at end of file
diff --git a/src/common/Elsa.Mediator/Contracts/ICommandSender.cs b/src/common/Elsa.Mediator/Contracts/ICommandSender.cs
index fb7a44b34..5373afb3b 100644
--- a/src/common/Elsa.Mediator/Contracts/ICommandSender.cs
+++ b/src/common/Elsa.Mediator/Contracts/ICommandSender.cs
@@ -6,13 +6,19 @@ namespace Elsa.Mediator.Contracts;
public interface ICommandSender
{
///
- /// Sends a command using he default strategy.
+ /// Sends a command using the default strategy.
+ ///
+ Task SendAsync(ICommand command, CancellationToken cancellationToken = default);
+
+ ///
+ /// Sends a command using the default strategy.
///
/// The command to send.
+ /// Any headers to pass along.
/// The cancellation token.
/// The type of the result.
/// The result.
- Task SendAsync(ICommand command, CancellationToken cancellationToken = default);
+ Task SendAsync(ICommand command, IDictionary