Skip to content

Commit

Permalink
Persist workflow variables during background execution. (#6195)
Browse files Browse the repository at this point in the history
Added a call to save workflow variables in the BackgroundActivityInvoker to ensure that any changes are persisted during background activity execution. This helps maintain consistency and state integrity across workflow invocations.
  • Loading branch information
sfmskywalker authored Dec 9, 2024
1 parent 4a19a77 commit d1ee5c7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public async Task ExecuteAsync(ScheduledBackgroundActivity scheduledBackgroundAc
activityExecutionContext.SetIsBackgroundExecution();
await activityInvoker.InvokeAsync(activityExecutionContext);
await ResumeWorkflowAsync(activityExecutionContext, scheduledBackgroundActivity);
await variablePersistenceManager.SaveVariablesAsync(workflowExecutionContext);
}

private async Task ResumeWorkflowAsync(ActivityExecutionContext activityExecutionContext, ScheduledBackgroundActivity scheduledBackgroundActivity)
Expand Down

0 comments on commit d1ee5c7

Please sign in to comment.