From the course: Complete Guide to Dapr for .NET and Azure Developers: Building and Managing Microservices

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Solution: Implementing a human-in-the-loop process

Solution: Implementing a human-in-the-loop process

(upbeat music) - [Instructor] To solve this challenge, we need to make some changes here in the patient admission workflow class. For instance, after we verify that there's a room available, we need to wait for the external event. So context, wait for external event async. And this is asking me about the event name. So let's name it, approved. And you can see that this is a generic method. So we need to specify the type that this event is going to return. So let's create a new record here and let's name it patient admission approval result. And it's going to have approved, and then the doctor name. Doctor name. Okay, so this is the type that I want to use here. So patient admission, approval result. And this is the event name. Okay, so let's wait for this and approve result, await. We can also specify the amount of time that we can wait for this event to be received. So you can see that it has this time span. So let's use it, say five minutes, otherwise the pet won't be admitted…

Contents