From ef65580d1fc1ea066167269b9d3da67ff022c7b7 Mon Sep 17 00:00:00 2001 From: Raymond den Haan Date: Thu, 6 Jun 2024 16:22:35 +0200 Subject: [PATCH] Fix naming --- .../Responses/BulkPublishWorkflowDefinitionsResponse.cs | 2 +- .../Endpoints/WorkflowDefinitions/BulkPublish/Endpoint.cs | 6 +++--- .../Endpoints/WorkflowDefinitions/BulkPublish/Models.cs | 4 ++-- .../Scenarios/DependencyWorkflowsPublishing/Tests.cs | 5 ----- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Responses/BulkPublishWorkflowDefinitionsResponse.cs b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Responses/BulkPublishWorkflowDefinitionsResponse.cs index 732e11682..88d11e693 100644 --- a/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Responses/BulkPublishWorkflowDefinitionsResponse.cs +++ b/src/clients/Elsa.Api.Client/Resources/WorkflowDefinitions/Responses/BulkPublishWorkflowDefinitionsResponse.cs @@ -7,4 +7,4 @@ public record BulkPublishWorkflowDefinitionsResponse( ICollection Published, ICollection AlreadyPublished, ICollection NotFound, - ICollection ConsumingUpdated); \ No newline at end of file + ICollection UpdatedConsumers); \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Endpoint.cs b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Endpoint.cs index 99115adad..675c80e79 100644 --- a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Endpoint.cs +++ b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Endpoint.cs @@ -33,7 +33,7 @@ internal class BulkPublish(IWorkflowDefinitionStore store, IWorkflowDefinitionPu var notFound = new List(); var alreadyPublished = new List(); var skipped = new List(); - var consumingUpdated = new List(); + var updatedConsumers = new List(); var definitions = (await store.FindManyAsync(new WorkflowDefinitionFilter { @@ -68,10 +68,10 @@ internal class BulkPublish(IWorkflowDefinitionStore store, IWorkflowDefinitionPu if (result.ConsumingWorkflows?.Any() == true) { - consumingUpdated.AddRange(result.ConsumingWorkflows.Select(x => x.DefinitionId)); + updatedConsumers.AddRange(result.ConsumingWorkflows.Select(x => x.DefinitionId)); } } - return new Response(published, alreadyPublished, notFound, skipped, consumingUpdated); + return new Response(published, alreadyPublished, notFound, skipped, updatedConsumers); } } \ No newline at end of file diff --git a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Models.cs b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Models.cs index b2ac516f6..03a4f9f4c 100644 --- a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Models.cs +++ b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowDefinitions/BulkPublish/Models.cs @@ -5,11 +5,11 @@ internal class Request public ICollection DefinitionIds { get; set; } = default!; } -internal class Response(ICollection published, ICollection alreadyPublished, ICollection notFound, ICollection skipped, ICollection consumingUpdated) +internal class Response(ICollection published, ICollection alreadyPublished, ICollection notFound, ICollection skipped, ICollection updatedConsumers) { public ICollection Published { get; } = published; public ICollection AlreadyPublished { get; } = alreadyPublished; public ICollection NotFound { get; } = notFound; public ICollection Skipped { get; } = skipped; - public ICollection ConsumingUpdated { get; } = consumingUpdated; + public ICollection UpdatedConsumers { get; } = updatedConsumers; } \ No newline at end of file diff --git a/test/integration/Elsa.Workflows.IntegrationTests/Scenarios/DependencyWorkflowsPublishing/Tests.cs b/test/integration/Elsa.Workflows.IntegrationTests/Scenarios/DependencyWorkflowsPublishing/Tests.cs index 7b0f28b12..33505d7e5 100644 --- a/test/integration/Elsa.Workflows.IntegrationTests/Scenarios/DependencyWorkflowsPublishing/Tests.cs +++ b/test/integration/Elsa.Workflows.IntegrationTests/Scenarios/DependencyWorkflowsPublishing/Tests.cs @@ -21,7 +21,6 @@ public class Tests private readonly IWorkflowDefinitionPublisher _workflowDefinitionPublisher; private readonly IActivitySerializer _activitySerializer; private readonly IActivityVisitor _activityVisitor; - // private readonly IWorkflowDefinitionManager _workflowManager; /// /// Initializes a new instance of the class. @@ -34,7 +33,6 @@ public class Tests .Build(); _workflowDefinitionPublisher = _services.GetRequiredService(); - // _workflowManager = _services.GetRequiredService(); _activitySerializer = _services.GetRequiredService(); _activityVisitor = _services.GetRequiredService(); } @@ -59,9 +57,6 @@ public class Tests var childDefinitionV2 = (await _workflowDefinitionPublisher.GetDraftAsync(childDefinitionV1.DefinitionId, VersionOptions.Published))!; await _workflowDefinitionPublisher.PublishAsync(childDefinitionV2); - // // Update consuming workflows to point to the new version of the child workflow. - // await _workflowDefinitionPublisher.UpdateReferencesInConsumingWorkflows(childDefinitionV2); - // Assert that the parent workflow now points to the new version of the child workflow. parentDefinition = await _services.GetWorkflowDefinitionAsync("parent", VersionOptions.Latest); var childActivityV2 = await GetChildActivityAsync(parentDefinition);