Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing WorkflowPassCompleted enum element in WorkflowPersistenceBehavior.cs #4480

Merged
merged 2 commits into from
Oct 7, 2023

Conversation

NightinGale997
Copy link

In Elsa.Abstractions there is enum for serialization of existing workflows in blob storage. WorkflowPassCompleted is missing there.

@NightinGale997
Copy link
Author

@dotnet-policy-service agree

@sfmskywalker
Copy link
Member

Thanks for the PR! I'm wondering if it's enough to just add the enum? Should there be some logic somewhere that checks for this value and take appropriate action?

@NightinGale997
Copy link
Author

NightinGale997 commented Sep 26, 2023

I found only one place where it would make sense to put logic behind it, in PersistWorkflow handler.

@@ -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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha. So, I think this may have been the reason I removed WorkflowPassCompleted in the past - it has effectively the same result as ActivityExecuted.

That being said, let's keep your changes in case we want to actually make a difference between the two behaviors.

@sfmskywalker sfmskywalker merged commit e0a4cd9 into elsa-workflows:master Oct 7, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants