Automate Desktop

Overview of Workflows

Chapter 4 | Automate 101

The Workflow Designer is where you can take the tasks you’ve created and link them together in a workflow. This video will show you how to best create your own workflows with a step-by-step tutorial. Pat Cameron, Director of Automation, will introduce you to the Workflow Designer and take you through creating your own workflow. In the following video, you’ll get an overview of the following:

  • How to create and edit a workflow
  • Linking your tasks together
  • Adding variables to your workflow
  • Adding a schedule to your workflow

Watch this chapter now and create workflows with Automate.

 

Transcript

[Pat Cameron:] The workflow designer in Automate is where you take the individual tasks that you've created and link them together in a workflow. You'll have your repository of tasks and you'll also have a repository of workflows. I'm just going to click on new and this is going to be my monthly report workflow that I've got. To [00:00:30] edit it, you just double-click on it. As you can see, you've got some options here. You can set up security. I'm going to use just defaults for now about what to do on air as far as the tasks, how to log in. You've got a number of different options that you can set when you're creating a workflow, just like you do when you're creating a task.

To edit the workflow, just double-click on it, and now I've got a blank screen. We've got some objects that are used to control how the workflow [00:01:00] runs and when it runs. Those conditions are just like the triggers in the task builder. Then now I've got my repository of tasks that are available to me. What I'm going to do with this workflow is first of all, I've got an FTP task that I've created and I'm going to run that to go grab some files for end of month processing. At the same time, I want to run a sequel query that's going to get some sale's information from one [00:01:30] of my databases. I can run both of those tasks. They can run on different agents or they can run on the same agent. It doesn't really matter.

When those two tasks' complete, I've got a task out there that will look at the reports that come from those tasks and see if they balance. When this workflow executes, I want the balance report task to wait for the other two, so I go to the objects and grab a weight control and just drag it over to the workflow designer. Then [00:02:00] I connect the two by taking the control for success and connecting it to the weight from the FTP task and also from the query sales' tables task. Now, once both of those run, then the balance report tasks will execute, and I link that to the weight as well. We'll go ahead and run this and you'll see that what will happen is, the FTP and the query sales [00:02:30] will both start at the same time, but one of them will finish before the other.

Then that weight will just kick in and it will hold that balance report task from running until both of those tasks have completed. As you can see here, my last step got an error, but just to show you that the same output that you get when you run a task is going to show up on the screen so that you can see where that error is. We'll just leave that for now. [00:03:00] The next thing I want to do is I want to put a couple other options after that balance report. What we're going to do is we're going to check the value of a variable before we go ahead and process those invoices. We've got two different options here. I can process the invoices if we're successful, and I can email the on-call group if we're not. We're going to link those two together.

In between, we're going to put a decision point, or an evaluation. What I want to take [00:03:30] a look at is a variable and the value of that variable. Just as you can create variables within tasks, you can create variables in the workflow that can be shared by all of the tasks in the workflow. I've got a variable out there called found totals. I'm going to keep that value at zero. If that value is zero when the balance report task completes, then it'll be okay to run the ... Process the invoices. If not, we're going to email the on-call group. [00:04:00] Our evaluation here is going to read the variable found totals. If it matches zero after processing, then it's okay to go. Again, we have the same flow controls here. Connect if it's successful.

Then you can go up to the top of the screen, yep, and I'm going to change that to a failure, so if there is an error or a failure doesn't match that value of the variable, I'm going to let the on-call group know and I'm going to send them the [00:04:30] name of the task and the name of the workflow. Now we've got our workflow created with a number of different steps. If we run it, you'll be able to see that it's all just going to flow one after another. We're going to wait again until that FTP completes and then go ahead and process the balance report task. When that completes, we're going to check the value of the total. [00:05:00] It's all good, so we're going to go ahead and process those invoices. Now the last thing that I'm going to do here is I'm going to add a schedule, so I could use any of these conditions.

We could check for a file. We could check a database. I'm just going to add a schedule on here and I'm going to run this task on the last day of the month. I just select the schedule where I want it to run. Run it on the last day of the month, go ahead and update that. Then the same process. I'm going to connect that last [00:05:30] day of the month schedule to those first two tasks in this workflow. It's nice to be able to have some documentation within your workflow to let other people know what's expected and how it's going to run. I connect the schedule and that's it. Now I've got my month end report processing all set up. It's going to run on the last day of the month.

 

Ready for the next chapter?

Chapter 5: Overview of Actions