diff --git a/src/WebJobs.Extensions.DurableTask/Bindings/OrchestrationTriggerAttributeBindingProvider.cs b/src/WebJobs.Extensions.DurableTask/Bindings/OrchestrationTriggerAttributeBindingProvider.cs index 3a277a505..b10240c48 100644 --- a/src/WebJobs.Extensions.DurableTask/Bindings/OrchestrationTriggerAttributeBindingProvider.cs +++ b/src/WebJobs.Extensions.DurableTask/Bindings/OrchestrationTriggerAttributeBindingProvider.cs @@ -234,7 +234,7 @@ private string OrchestrationContextToString(DurableOrchestrationContext arg) new JProperty("isReplaying", arg.IsReplaying), new JProperty("parentInstanceId", arg.ParentInstanceId), new JProperty("upperSchemaVersion", SchemaVersion.V2), - new JProperty("upperSchemaVersionNew", SchemaVersion.V3), + new JProperty("upperSchemaVersionNew", SchemaVersion.V4), new JProperty("longRunningTimerIntervalDuration", arg.LongRunningTimerIntervalLength), new JProperty("maximumShortTimerDuration", arg.MaximumShortTimerDuration), new JProperty("defaultHttpAsyncRequestSleepTimeMillseconds", arg.DefaultHttpAsyncRequestSleepTimeMillseconds)); diff --git a/src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs b/src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs index 47d7c9092..262769aff 100644 --- a/src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs +++ b/src/WebJobs.Extensions.DurableTask/Listener/OutOfProcOrchestrationShim.cs @@ -39,6 +39,7 @@ internal enum SchemaVersion Original = 0, V2 = 1, V3 = 2, + V4 = 3, } private enum AsyncActionType @@ -168,7 +169,7 @@ private Task InvokeAPIFromAction(AsyncAction action, SchemaVersion schema) } case AsyncActionType.ContinueAsNew: - this.context.ContinueAsNew(action.Input); + this.context.ContinueAsNew(action.Input, action.PreserveUnprocessedEvents); task = fireAndForgetTask; break; case AsyncActionType.WaitForExternalEvent: @@ -229,6 +230,7 @@ private async Task ReplayOOProcOrchestration(AsyncAction[][] actions, SchemaVers { switch (schema) { + case SchemaVersion.V4: case SchemaVersion.V3: case SchemaVersion.V2: // In this schema, action arrays should be 1 dimensional (1 action per yield), but due to legacy behavior they're nested within a 2-dimensional array. @@ -313,6 +315,9 @@ private class AsyncAction [JsonProperty("input")] internal object Input { get; set; } + [JsonProperty("preserveUnprocessedEvents")] + internal bool PreserveUnprocessedEvents { get; set; } = false; + [JsonProperty("compoundActions")] internal AsyncAction[] CompoundActions { get; set; } diff --git a/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj b/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj index 0b17fee29..f9f98625e 100644 --- a/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj +++ b/src/WebJobs.Extensions.DurableTask/WebJobs.Extensions.DurableTask.csproj @@ -6,8 +6,8 @@ Microsoft.Azure.WebJobs.Extensions.DurableTask 2 13 - 4 - $(PackageSuffix) + 5 + preview.1 $(MajorVersion).$(MinorVersion).$(PatchVersion) $(MajorVersion).0.0.0 Microsoft Corporation @@ -57,7 +57,7 @@ - +