Skip to content

Commit

Permalink
Missing WorkflowPassCompleted enum element in WorkflowPersistenceBeha…
Browse files Browse the repository at this point in the history
…vior.cs (#4480)

* Update WorkflowPersistenceBehavior.cs

* Update PersistWorkflow.cs
  • Loading branch information
NightinGale997 authored Oct 7, 2023
1 parent 0fbeebe commit e0a4cd9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Newtonsoft.Json;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;

namespace Elsa.Models
Expand All @@ -15,7 +15,12 @@ public enum WorkflowPersistenceBehavior
/// Workflow instances are persisted after the workflow completed a burst of execution.
/// </summary>
WorkflowBurst,


/// <summary>
/// Workflow instances are persisted after the workflow executed scheduled activities.
/// </summary>
WorkflowPassCompleted,

/// <summary>
/// Workflow instances are persisted after each activity that executed.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/core/Elsa.Core/Handlers/PersistWorkflow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public async Task Handle(WorkflowExecutionPassCompleted notification, Cancellati
{
var behavior = notification.WorkflowExecutionContext.WorkflowBlueprint.PersistenceBehavior;

if (behavior == WorkflowPersistenceBehavior.ActivityExecuted || notification.ActivityExecutionContext.ActivityBlueprint.PersistWorkflow)
if (behavior == WorkflowPersistenceBehavior.ActivityExecuted || behavior == WorkflowPersistenceBehavior.WorkflowPassCompleted || notification.ActivityExecutionContext.ActivityBlueprint.PersistWorkflow)
await SaveWorkflowAsync(notification.WorkflowExecutionContext.WorkflowInstance, cancellationToken);
}

Expand Down

0 comments on commit e0a4cd9

Please sign in to comment.