Update activity registry & workflow definitions

This commit removes unnecessary calls related to populating activity registry and reinitializing workflow definitions.
This commit is contained in:
Raymond den Haan 2024-05-13 16:16:45 +02:00 committed by raymonddenhaan
parent 3272938c8e
commit 2abe58fa10
3 changed files with 1 additions and 9 deletions

View file

@ -12,13 +12,6 @@ public interface IActivityRegistryPopulator
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task PopulateRegistryAsync(CancellationToken cancellationToken = default);
/// <summary>
/// Populates the <see cref="IActivityRegistry"/> with activities for the specified provider.
/// </summary>
/// <param name="providerType">The type of the provider.</param>
/// <param name="cancellationToken">The cancellation token.</param>
Task PopulateRegistryAsync(Type providerType, CancellationToken cancellationToken = default);
/// <summary>
/// Tries to add a workflow as an activity to the registry.

View file

@ -148,7 +148,6 @@ public class WorkflowDefinitionPublisher : IWorkflowDefinitionPublisher
throw new InvalidOperationException("Cannot retract an unpublished workflow definition.");
definition.IsPublished = false;
definition = Initialize(definition);
await _notificationSender.SendAsync(new WorkflowDefinitionRetracting(definition), cancellationToken);
await _workflowDefinitionStore.SaveAsync(definition, cancellationToken);

View file

@ -25,7 +25,7 @@ public class DefaultRegistriesPopulator : IRegistriesPopulator
// Stage 1: Populate the activity registry.
// Because workflow definitions can be used as activities, we need to make sure that the activity registry is populated before we populate the workflow definition store.
await _activityRegistryPopulator.PopulateRegistryAsync(cancellationToken);
// Stage 2: Populate the workflow definition store.
await _workflowDefinitionStorePopulator.PopulateStoreAsync(false, cancellationToken);