The Automate Task Builder interface is built around the idea of sessions. Derived from computer science, a session is a semi-permanent, interactive exchange of information between two or more entities. 

That’s great. Now what does this mean in English?

The first two terms that we should tackle are interactive and semi-permanent. Interactive is pretty straight forward in the sense that it implies that there is some sort of activity and response. Semi-permanent can be thought of as a sliding door…it’s there when you want it to be, out-of-the-way when you don’t. Entities are types of object such as devices, computers, as well as users.

Take for example when I call my mother. Now, when I dial her number, creating a session is perhaps the last thing that we think about. (Perhaps finding a way to dodge the “grandchild” discussion is more pressing.) Think of it this way: The phone connection between me and my mother isn’t always on.  To be connected, I have to dial her number—and this is a session being established. As for the interactive exchange of information, think of it as the conversation where you update each other on what is going on in life. At the end of the call when you hang up, the session is shut down. Semi-permanent.

Now that we have the basics of sessions, let’s apply our new-found knowledge to the Automate environment. Sessions are used in the following Automate Actions and all behave the same:

  • SQL
  • FTP
  • Web Browser
  • SharePoint
  • Excel
  • Terminal
  • VMware
  • AWS
  • Azure
  • XML
  • Dynamics CRM

The Excel Action

The first example we’re going to look at revolves around Excel. When you use the Open Workbook Action, the following screen appears:

Open Workbook

Now notice how under “Session name” there is a textbox that contains ExcelSess1. This session name is how you will reference the spreadsheet from here on out. So if you want to have multiple spreadsheets open at the same time, you can give them different session names. (In this case ExcelSess1, ExcelSess2 and ExcelSess3.) This will allow you to manipulate and reference each of those spreadsheets independently.

Multiple Sessions

Now remember that because sessions are semi-permanent, they need to be closed when you are finished. In Excel, this pertains to saving and closing the spreadsheet. Using the Excel Close Workbook Action you can also specify which workbooks you wish to close by referencing the session name. (See steps 3-6 in the above image where it references the specific session to close.)

Close Session

The FTP Action

Next we are going to take a look at how Automate sessions work with FTP. A typical FTP session involves three parts:

  1. Logging in
  2. File Transfer (Up/Down)
  3. Logging Out

Sessions for FTP

1. During the logon step (pictured below), notice how under “Session” there is FtpSession1. This is the session name for this particular login/username/password combination. Once you have established this step, any other interactions to this host can be done referencing the session name.

FTP Sessions

2. In this step (screenshot below), we are going to be downloading and specifying a session. Notice how we have FtpSession1 selected so we no longer need to enter in the credentials.

FTP Sessions

3. Now for Step 3, we are logging out of the FTP Server (closing the session because we are finished).

Logoff FTP

Being able to create a session for each FTP connection allows us to manage multiple connections that involve different usernames/passwords at the same time.

Which brings us to our next point: What if you need to complete two different file transfers; once at the beginning and once at the end of your task (with some steps inbetween)? In the screenshot below, a file is downloaded in Steps 1-3 and also downloaded in Steps 8-10.

FTPSession1

While the steps above will work fine, I think we can make the task more efficient since we are logging into the same FTP Server. One of the things you may notice is that we are logging in twice (Step 1 and Step 8) as well as logging out twice (Step 3 and Step 10). A better way of achieving this is to log in at the beginning and log off at the end of the task. This would remove the unnecessary steps.

Sessions

As you can see from the screenshot above, we were able to remove two unnecessary steps and clean up our task. We are now logging in only at the beginning, executing whatever steps we require and then logging out at the end. As a rule of thumb, maintaining one session through the entire task is more efficient than having to create multiple sessions/end sessions throughout.

Applies to: Automate 10

Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case