Rock U - Workflows - Persisted Workflows
Transcribed Video Content
Some workflows run and disappear in a single pass, whereas others will have one action, then you may wait hours or days for the next action. And so that that workflow doesn't get lost, we can use persistence to make sure that it stays ready for when the next action happens. Let's look at how to set up workflow persistence right now. The options you have for persistence is first of all, to never persist. This is something that's right to do when your workflow is running a simple action and you don't need it to pause in different places.
You don't need to go back and debug things, say that this is triggered based off of a simple change and a simple change is made with the workflow, you probably actually don't need to persist. Then on the other hand or the next option is actually to persist from an action. So if you were persisting from the beginning of a workflow for a workflow that includes user entry, say someone clicked to that user entry page and they don't fill anything out, maybe they just wanted to see what fields are available or what this workflow is about, then when you go into the history or when you go look at all the workflow instances, you'll notice there's probably a lot of kind of trash entries that just happened because you persisted from the beginning. When instead you can persist from an action such as when the first form is submitted, then you'll make sure the instances that are created are always, relevant or they're actually workflow instances that you wanted to persist. Then there are still quite a few workflows where you might wanna persist all the way through such as a position approval, workflow where there's a long series of activities and this workflow is passed back and forth between multiple people, maybe it will take them multiple days to complete different things, then you'll wanna persist from the beginning so that it's easy to pick up this workflow at any point and every action is tracked properly.
Persistence is the difference between a workflow that remembers and one that just runs. Making sure that you're thoughtful about which workflows should have persistence and which shouldn't will keep your database clean and workflows running on the right schedule.