Hoffmania
Hoffmania

Reputation: 1046

Azure durable functions

Ok completely new to this essentially we want to be able to time out a session after 10mins. that's pretty easy.

We also want to wait for external user input -- essentially data from a multi step form. also pretty easy.

We want to be able to Task.WaitAny (waitforexternalevent("updatedata"), timeout)

But this is causing issues in the orchestration.

Individually these concepts work, however we see the Task.WaitAny to unblock and reuse the first "updatedata" event.. other "updatedata" events never reach the orchestration.

Is this expected behavior, are we mixing concepts in an invalid way, or is this a bug?

Upvotes: 1

Views: 396

Answers (1)

Drew Marsh
Drew Marsh

Reputation: 33379

We might need to see some more of your code, but with what you've described here I think the behavior you're seeing is what should be expected.

Your orchestration is "waiting" on the timeout or the external event. Once that external event is triggered, the orchestration is going to move forward and, even if something triggers that event again, the orchestration is not expecting/waiting on it.

Again, this is based on the sliver of code you've included in your question thus far. If you need to handle the event being broadcast into the orchestration multiple times you would need to have a loop of some kind.

Upvotes: 1

Related Questions