Python-powered Chat Apps with Twilio and SendGrid Transcripts
Chapter: Messaging and workflows with Twilio Studio
Lecture: Restarting running workflows

Login or purchase this course to watch this video and the rest of the course contents.
0:00 One thing you can run into that's a little not obvious. Once you see it is completely easy to fix. But knowing what to do here,
0:08 it's not entirely obvious. So let's suppose we've started our conversation with Cloud City Cake company.
0:14 We're gonna love a small cake with some vanilla flavor. But for our frosting, we want Mapel, I notice here there's a little problem.
0:24 Vanilla cake Sounds delicious. Oh, well, that's no problem. We can go fix that. Let's just go back to the studio and I'll make a change here.
0:33 So we're asking for the frosting. We want that little space, right? Like so, we hit save, Perfect. We're ready to fix our problem.
0:43 We can publish it. Let's go back over to WhatsApp and see if I fixed it. maplee. We're not maplee Wait a minute.
0:53 What's going on here? Why am I still seeing this old one? What happens is, once you start one of these workflows,
1:02 you're tied into that version of the workflow. And if it's in flight after changes are made, well, too bad you won't see those.
1:10 That's totally good. It means it's consistent. And, you know, maybe there were questions that were needed later that would not
1:15 have been asked because you're already halfway through it. You don't want it to restart. You want to just carry on. And yet, as a developer,
1:24 you probably wanted to restart. You're like, Okay, great. We'll just start over. Hi. Let's just start this conversation over, so I can fix.
1:32 I can verify my fix for my changes. Wait a minute. No matter what I type here, I am stuck halfway through this
1:39 workflow. So one thing you could do that's painful is to make your way all the way through it. Another thing you can do is click a button over in
1:47 studio and say, Cancel this and the next time you talk to it will start over. Over here remember, we've already made our fix,
1:55 but we have these running workflows. If we come out of full screen mode and go to logs over here, notice there's this one that's running right now.
2:04 This is the one that I was trying to get out of, the one we just saw. So let's stop the execution. We'll just go back to the editor.
2:11 Doesn't matter. But that's where we want to be. And back to WhatsApp. Now, if I type hi. Greetings from Cloud City. What size of cake would you like?
2:21 Well, I would like, large. That made me hungry. That bug hunting. So here we have our rainbow and look at that fixed rainbow
2:30 cake, Sounds delicious. What kind of frosting would you like with it?
2:34 So that's how you can exit out of or stop these running instances of these workflows with your WhatsApp instance to say,
2:41 No, no, no. I want to start over. Let's try again. I've made some changes. Just drop what you're doing and start over.
2:46 So this is really important as a developer to make it really easy to jump back and check out your changes and so on.
2:53 It doesn't really much matter in production.
2:55 Most of the time, people won't be in those problems. It maybe but is really something you are going to do frequently as a developer.

Talk Python's Mastodon Michael Kennedy's Mastodon