In this quick tip we're going to learn how to use the terminate workflow action.
Transcript
In this Quick Tip, we’re going to learn about the terminate workflow action.
This action is as it sounds. Wherever you place this action, the workflow will end immediately.
Here we have a workflow that lets us modify one of our products. We can add this action to it and when we hit this step, the workflow is terminated, and none of the remaining will trigger.
While this is nice to have, it’s even more useful if we add a condition to it. For example, if the Current user isn’t logged in, then terminate this workflow. If the user is logged in, the terminate workflow action is skipped and the workflow continues on as normal. But if the user isn’t logged in, and we run the workflow, when we hit the terminate action, we can see as it evaluates to true, the remaining actions aren't triggered.
This action combined with conditionals can help filter out decisions like a decision tree as you go through each step in your workflow. Note, if you’re running a custom workflow and you use this action, it will terminate that workflow, but not the parent workflow that triggered it.
That's it for this Quick Tip! For more, be sure to check out bubble.io/academy.