Let's start this section with an example. Let's assume there's a restaurant that uses robots as its waiters to help serve food to customers. Let's say that once the customer has taken their seat, they call the waiter by pressing a simple button on their table. The waiter robot understands the call and navigates to the table, takes the order from the customer, goes to the kitchen to place the order to the chef, and delivers the food to the customer once food is ready. Here, the robot tasks are to navigate to the customer's place, take the order, go to the kitchen, and bring food back to the customer.
A typical approach would be to define a script with multiple functions for individual tasks, put them together through a series of condition or case statements, and run the application. Well, the application might work as expected...