Skip to content

Commit

Permalink
Merge pull request #6209 from elsa-workflows/feature/delay
Browse files Browse the repository at this point in the history
Fixed issues where the outputs of a background activity will not be mapped
  • Loading branch information
sfmskywalker authored Dec 13, 2024
2 parents cc75bb6 + 49715bb commit ddfac51
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public async Task ExecuteAsync(ScheduledBackgroundActivity scheduledBackgroundAc
await variablePersistenceManager.LoadVariablesAsync(workflowExecutionContext);
activityExecutionContext.SetIsBackgroundExecution();
await activityInvoker.InvokeAsync(activityExecutionContext);
await ResumeWorkflowAsync(activityExecutionContext, scheduledBackgroundActivity);
await variablePersistenceManager.SaveVariablesAsync(workflowExecutionContext);
await ResumeWorkflowAsync(activityExecutionContext, scheduledBackgroundActivity);
}

private async Task ResumeWorkflowAsync(ActivityExecutionContext activityExecutionContext, ScheduledBackgroundActivity scheduledBackgroundActivity)
Expand Down Expand Up @@ -110,7 +110,7 @@ private IDictionary<string, object> ExtractActivityOutput(ActivityExecutionConte
var driver = variableMetadata?.StorageDriverType;

// We only capture output written to the workflow itself. Other drivers like blob storage, etc. will be ignored since the foreground context will be loading those.
if (driver != typeof(WorkflowStorageDriver) && driver != typeof(WorkflowInstanceStorageDriver))
if (driver != typeof(WorkflowStorageDriver) && driver != typeof(WorkflowInstanceStorageDriver) && driver != null)
continue;

var outputValue = activityExecutionContext.Get(memoryBlockReference);
Expand Down

0 comments on commit ddfac51

Please sign in to comment.