using Elsa.Workflows.Activities;
using Elsa.Workflows.Management.Entities;
using Elsa.Workflows.Runtime.Entities;
using Elsa.Workflows.Runtime.Filters;
using Elsa.Workflows.Runtime.Notifications;
namespace Elsa.Workflows.Runtime;
///
/// Extracts triggers from workflow definitions.
///
public interface ITriggerIndexer
{
///
/// Removes triggers matching the specified filter.
///
Task DeleteTriggersAsync(TriggerFilter filter, CancellationToken cancellationToken = default);
///
/// Indexes triggers of the specified workflow.
///
Task IndexTriggersAsync(WorkflowDefinition definition, CancellationToken cancellationToken = default);
///
/// Indexes triggers of the specified workflow.
///
Task IndexTriggersAsync(Workflow workflow, CancellationToken cancellationToken = default);
///
/// Returns triggers for the specified workflow definition.
///
/// The workflow.
/// An optional cancellation token.
/// A collection of triggers.
Task> GetTriggersAsync(Workflow workflow, CancellationToken cancellationToken = default);
}