diff --git a/src/core/Elsa.Core/Elsa.Core.csproj b/src/core/Elsa.Core/Elsa.Core.csproj index 773efdef2..7fbf7e21a 100644 --- a/src/core/Elsa.Core/Elsa.Core.csproj +++ b/src/core/Elsa.Core/Elsa.Core.csproj @@ -42,7 +42,7 @@ - + diff --git a/src/core/Elsa.Core/Services/Workflows/WorkflowRunner.cs b/src/core/Elsa.Core/Services/Workflows/WorkflowRunner.cs index 36bc813d9..43e8cb7c0 100644 --- a/src/core/Elsa.Core/Services/Workflows/WorkflowRunner.cs +++ b/src/core/Elsa.Core/Services/Workflows/WorkflowRunner.cs @@ -204,10 +204,8 @@ namespace Elsa.Services.Workflows private async ValueTask CanExecuteAsync(WorkflowExecutionContext workflowExecutionContext, IActivityBlueprint activityBlueprint, bool resuming, CancellationToken cancellationToken) { - using var scope = _serviceScopeFactory.CreateScope(); - var activityExecutionContext = new ActivityExecutionContext( - scope.ServiceProvider, + workflowExecutionContext.ServiceProvider, workflowExecutionContext, activityBlueprint, workflowExecutionContext.Input,