Open davidmrdavid opened 1 year ago
@hossam-nasr: for the new programming model, we should consider whether or not to continue supporting this kind of compound task.
@davidmrdavid Sounds good, I've created an issue for that here: #424. Let's triage this on our next sync (with the rest of the remaining v3 issues)
Follow up to: https://github.com/Azure/azure-functions-durable-js/pull/405/files#r1068072395
Our CompoundTask can be constructed without any sub-tasks / children. We handle this case by immediately setting the Task to "Completed" See here:
https://github.com/Azure/azure-functions-durable-js/blob/66ba4a172687543624cbc89a6c3836c70721a1e7/src/task.ts#L226-L247
This is an edge case, and perhaps one that we should not have supported in the first place. Assuming we were to continue supporting it, we should determine how to set the Task's
isPlayed
property, which is used to set thecontext.IsReplaying
flag. Today, the tasks'isPlayed
property remains unchaged, meaning that it isfalse
and so it runs the risk of changing thecontext.IsReplaying
flag tofalse
when it shouldn't.