Fix naming

This commit is contained in:
Raymond den Haan 2024-06-06 16:22:35 +02:00 committed by raymonddenhaan
parent 1d4d3ea108
commit ef65580d1f
4 changed files with 6 additions and 11 deletions

View file

@ -7,4 +7,4 @@ public record BulkPublishWorkflowDefinitionsResponse(
ICollection<string> Published,
ICollection<string> AlreadyPublished,
ICollection<string> NotFound,
ICollection<string> ConsumingUpdated);
ICollection<string> UpdatedConsumers);

View file

@ -33,7 +33,7 @@ internal class BulkPublish(IWorkflowDefinitionStore store, IWorkflowDefinitionPu
var notFound = new List<string>();
var alreadyPublished = new List<string>();
var skipped = new List<string>();
var consumingUpdated = new List<string>();
var updatedConsumers = new List<string>();
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);
}
}

View file

@ -5,11 +5,11 @@ internal class Request
public ICollection<string> DefinitionIds { get; set; } = default!;
}
internal class Response(ICollection<string> published, ICollection<string> alreadyPublished, ICollection<string> notFound, ICollection<string> skipped, ICollection<string> consumingUpdated)
internal class Response(ICollection<string> published, ICollection<string> alreadyPublished, ICollection<string> notFound, ICollection<string> skipped, ICollection<string> updatedConsumers)
{
public ICollection<string> Published { get; } = published;
public ICollection<string> AlreadyPublished { get; } = alreadyPublished;
public ICollection<string> NotFound { get; } = notFound;
public ICollection<string> Skipped { get; } = skipped;
public ICollection<string> ConsumingUpdated { get; } = consumingUpdated;
public ICollection<string> UpdatedConsumers { get; } = updatedConsumers;
}

View file

@ -21,7 +21,6 @@ public class Tests
private readonly IWorkflowDefinitionPublisher _workflowDefinitionPublisher;
private readonly IActivitySerializer _activitySerializer;
private readonly IActivityVisitor _activityVisitor;
// private readonly IWorkflowDefinitionManager _workflowManager;
/// <summary>
/// Initializes a new instance of the <see cref="Tests"/> class.
@ -34,7 +33,6 @@ public class Tests
.Build();
_workflowDefinitionPublisher = _services.GetRequiredService<IWorkflowDefinitionPublisher>();
// _workflowManager = _services.GetRequiredService<IWorkflowDefinitionManager>();
_activitySerializer = _services.GetRequiredService<IActivitySerializer>();
_activityVisitor = _services.GetRequiredService<IActivityVisitor>();
}
@ -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);