Fixed issues that the outputs of a background actiity to not be mapped

This commit is contained in:
Marius Vasile Vușcan 2024-12-13 12:18:15 +02:00
parent cc75bb65ea
commit 49715bb2a7
No known key found for this signature in database
GPG key ID: E0EC75631D902E06

View file

@ -40,8 +40,8 @@ public class BackgroundActivityInvoker(
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)
@ -110,7 +110,7 @@ public class BackgroundActivityInvoker(
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);