diff --git a/src/core/Elsa.Abstractions/Services/Workflows/IWorkflowLaunchpad.cs b/src/core/Elsa.Abstractions/Services/Workflows/IWorkflowLaunchpad.cs index da15493e9..208809bf1 100644 --- a/src/core/Elsa.Abstractions/Services/Workflows/IWorkflowLaunchpad.cs +++ b/src/core/Elsa.Abstractions/Services/Workflows/IWorkflowLaunchpad.cs @@ -95,7 +95,7 @@ namespace Elsa.Services Task> CollectAndDispatchWorkflowsAsync(CollectWorkflowsContext context, object? input = default, CancellationToken cancellationToken = default); } - public record CollectWorkflowsContext(string ActivityType, IBookmark? Bookmark, IBookmark? Trigger, string? CorrelationId = default, string? WorkflowInstanceId = default, string? ContextId = default, string? TenantId = default); + public record CollectWorkflowsContext(string ActivityType, IBookmark? Bookmark, IBookmark? Trigger = default, string? CorrelationId = default, string? WorkflowInstanceId = default, string? ContextId = default, string? TenantId = default); public record CollectStartableWorkflowsContext(string WorkflowDefinitionId, string? ActivityId = default, string? CorrelationId = default, string? ContextId = default, string? TenantId = default); } \ No newline at end of file diff --git a/src/core/Elsa.Core/Services/Workflows/WorkflowLaunchpad.cs b/src/core/Elsa.Core/Services/Workflows/WorkflowLaunchpad.cs index 88da7dd97..6e8362a26 100644 --- a/src/core/Elsa.Core/Services/Workflows/WorkflowLaunchpad.cs +++ b/src/core/Elsa.Core/Services/Workflows/WorkflowLaunchpad.cs @@ -199,7 +199,7 @@ namespace Elsa.Services.Workflows { _logger.LogDebug("Triggering workflows using {ActivityType}", context.ActivityType); - var filter = context.Trigger; + var filter = context.Trigger ?? context.Bookmark; var triggers = filter != null ? (await _triggerFinder.FindTriggersAsync(context.ActivityType, filter, context.TenantId, cancellationToken)).ToList() : new List(); var startableWorkflows = new List();