I think there is a bug in context.df.Task.any that it leaves orchestrator in invalid state if waitForExternalEvent is first task to finish.
Investigative information
durable-functions npm module version: 3.0.1
Language (JavaScript/TypeScript) and version: 5.2.2
Node.js version: v18.18
Actual behavior
When using context.df.Task.any with context.df.createTimer & context.df.waitForExternalEvent and if context.df.waitForExternalEvent task finishes first orchestrator is left in invalid state and starts to receive old values from context.df.callActivity('pop_queue') without even calling the activity meaning code in the activity is never called.
Describe the bug
I have this code
After this code is run under function emulator 4.0.5455 on WIndows 11
this code starts returning old data without calling the activity
If I change code 1. to this everything works
I think there is a bug in context.df.Task.any that it leaves orchestrator in invalid state if waitForExternalEvent is first task to finish.
Investigative information
Actual behavior When using context.df.Task.any with context.df.createTimer & context.df.waitForExternalEvent and if context.df.waitForExternalEvent task finishes first orchestrator is left in invalid state and starts to receive old values from context.df.callActivity('pop_queue') without even calling the activity meaning code in the activity is never called.