# Routing patterns walkthrough

Use the Set Variable module to send a number through multiple paths to see how filters and fallbacks behave when routing.

## Routing patterns walkthrough

Workfront recommends watching the exercise walkthrough video before trying to recreate the exercise in your own environment.

Transcript
The purpose of this walkthrough exercise is to conceptually learn how routing paths behave and how bundles will pass down them based on the filters set up. We’ll also learn about fallback routes which is a route that a bundle will pass down if it can’t go down any other paths.
Finally, we talk about what will happen to a fallback route if another path is added and no filter is created, meaning a bundle will pass down that path every single time. You don’t need any spreadsheets or your test drive instance to be prepared for this exercise. You only need to create a new scenario and use what’s in the system.
Let’s start by creating a new scenario in our exercise folder. Once we get to the next page, we can bypass it because we aren’t actually connecting to a software or service for this walkthrough exercise.
Best practice is to rename our scenario before we begin, and I’ll call this Routing Patterns and Fallbacks.
For our trigger module, I want to use the Set variable tool.
For the variable name, I’m simply going to say My Number. Variable lifetime, we can leave as one cycle, and the variable value we can set to 75 for right now. Click Okay.
Once we do that, let’s add another module, and we’ll use the Increment function.
You can leave it as is and just click Okay. Then to create a second path, let’s right-click our increment function, clone that module, move it below, and connect it to the first module to create that router. Go ahead and realign, if you’d like.
Now that we have our two paths established, let’s create filters on the first and second to where our number, if less than 100, will go down the first path. If less than 1,000, it’ll go down the second. Clicking to create a filter on the first path, I’ll simply label it Is less than 100. My condition, I’ll say My Number for my trigger module, go to my Numeric operators, less than, and choose 100.
I’ll do the same for the second path, but change it to 1,000.
Now since I know that my set variable number is 75, if I run the scenario once, I can guess that it will go down the first path because it’s less than 100, and it’ll go down the second path because it’s less than 1,000. Let’s see.
As I can tell from the execution inspector, bundles came through our trigger module and passed down the first and the second paths. Let’s click into our set variable and change it from 75 to 750. Now I can guess that it won’t pass down the first path because it’s not less than 100, but it will still pass down the second path because it’s less than 1,000. Let’s go ahead and run the scenario.
As we can see, one bundle was processed in the beginning. It couldn’t go down the first path, but it did go down the second.
This is a good example of a non-exclusive path because a bundle of information may pass down multiple paths, or it may only go down one or no paths.
Now let’s add a fallback route to our scenario. I’m going to start by zooming out just a little bit so I have more space, right-clicking my increment function, and cloning that module. Then I’ll add it to my router to create a third path. As you can see, all three paths have an arrow icon indicating they’re just regular router paths. If I click in as if I were creating a filter for this third path but then only choose that fallback route option, I’ve now created my fallback route for this router. Go ahead and click Okay and notice that the icon in the router changes. If it’s a regular path a bundle will pass down, there’s an icon of an arrow pointing in that direction. If it’s a fallback route, and remember you can only have one, it turns into a carrot icon. If I were to switch the fallback route to another path, then it would disappear from here and go to that other spot. Let’s auto-align our scenario to clean it up and click into our Set variable and change it from 750 to 7,500. Now I could guess that it won’t pass down the first path because it’s not less than 100. It won’t pass down the second path because it’s not less than 1,000, so it will result in going down the fallback path. If it can’t go down any available path, it’s going to go down the fallback. Let’s run the scenario and see what happens.
As expected, our number is processed in the trigger and then it only goes down our third path with the fallback on it. Now just for fun and just to reiterate the concept we’re trying to learn of routing paths and fallbacks, if we right-click and clone this module, create a fourth path and not add a filter, what do you think will happen to our fallback route? Will any information ever pass down that path? The answer is no. Because there’s no filter on this third path, a bundle will always pass through. It doesn’t matter if the number’s one or 1 million. It will always go down this fourth path, which means nothing will ever happen with that fallback since it always has an option.
Let’s click Auto-align one last time and save the scenario before finishing. -

## Want to learn more? We recommend the following:

Workfront Fusion documentation

recommendation-more-help
c9fbcf61-6d19-481e-a9ab-f54a0ae0ee8a