»  »  »  » 

Getting Started with Projects

In this tutorial, you will learn the basics on how to design Projects in GoAnywhere MFT.

 

Projects are used to describe the work for GoAnywhere to perform. For example, a Project could be defined to retrieve information from a database, convert that data to an Excel, CSV or XML document, and distribute the file to the network or an SFTP server.

Project Explorer

Projects in GoAnywhere are created and organized in the Project Explorer. To access the Project Expolorer, click Workflows from the dashboard, and then Projects. On the Projects toolbar, you can create a new Project, search for Projects, import Project definitions, or manage folders.

Project Explorer

To add a new Project in this folder, click the Create Project button, give the Project a name and an optional description, and then click the Save button to launch the Project Designer.

Project Designer

The Project Designer is comprised of three main sections. The Project Outline will be displayed on the left side of the screen and is a visual representation of your workflow; with tasks, decisions, and loops executed in the order in which they appear.

Below the Project Outline is the Component Library. Tasks can be added from the library by dragging and dropping them into the Project Outline. The order of the tasks in the Project Outline can be rearranged using your mouse and the Project Designer supports common keyboard shortcuts for copying, cutting, pasting, and deleting tasks.

The right side of the Project Designer is where you configure tasks and specify attributes for the currently selected item.

Project Designer

Project Components

Project definitions are made up of Modules, Tasks, Elements, Decisions, Loops, and Variables.

A Module is a logical grouping of one or more Tasks to execute. Multiple modules can be defined in a Project. For example, one Module could contain the tasks to perform the data translation and the transmission of files, whereas another Module could contain an email notification task that is called only when an error occurs in the Main Module.

A task is a discrete business process to perform. For instance, a task may write data to an XML document, send an email, import data from an Excel file, or SFTP a file to a trading partner. GoAnywhere includes over 60 different tasks to choose from and there is no limit to the number of tasks that can be defined in a Project.

A task may be contain one or more Elements, which describes the types of work to perform within the task. For example, the SFTP task has an Element to upload a file to an SFTP server, an Element to download a file from an SFTP server, an Element to rename a file, and so on.

Decisions, such as If and Else, help direct the flow of a Project based on the certain conditions such as a variable.

A variable acts as a reference to a particular value, such as a date, a list of files, or data from a database. Variables can be used in Projects to supply values to tasks, decisions, and loops. Variables can be user-defined or system variables. A variable can also be created as a result of a task.

Loops allow you to repeat tasks for a specified number of times or to iterate over a collection of items, such as a list of files.

Example Project

To see it in action, let's build an example Project using a common customer workflow that will query a database, save the results to an excel file, and then SFTP that file to a trading partner.

Database

From the Component Library, expand the Database folder and drag the SQL task to the Project Outline. In the work panel, you can change the Label that appears in the Project Outline by giving this task a new name. Next, select the Database Server you want to query using the drop-down list. If you do not have a Database Resource defined yet, you can click on the Create button to add one.

SQL Query

While still on the SQL task, click on the Add menu and select the Add a Query option. We'll use the following SQL "select * from customer;" which will return a list of customer records. On the Output Variable attribute, you will need to specify a variable name that we will reference in the Write Excel task to access the data. In this case, we will use "data" as the variable name.

Next, add the Write Excel task to the Project Outline by dragging the task from the Component Library.

On the Write Excel task, you need to reference the RowSet variable that was created in the previous task. To reference any variable within GoAnywhere, use the syntax of dollar sign & curly bracket (for example, ${data}).

Write Excel

In the Output File field, add a directory path and file name where the Excel Spreadsheet will be saved.

When the Excel task executes, it will automatically read the rows from the SQL results variable and write them to an Excel file. You can optionally add elements to the Write Excel task to add a page header and footer, column and page titles, or format the data that appears in the columns.

Output Variables

Before you send the file to a trading partner by SFTP, you need a way to easily tell the SFTP task how to find the file that was created by the Write Excel task. To do that, click on the Write Excel's Output Variables tab, and specify ‘excelFile' as the Output File Variable.

Expand the FTP folder from the component Library, and drag the SFTP task to the Project Outline.

You can create a new SFTP Server resource, or select a pre-configured server from the drop down.

After the server is selected, right-click on the SFTP task and choose the Put Files Element. On the Source Files Variable field, enter the variable created from the Write Excel task using the dollar sign curly braces format.

Put Files

Next, specify the destination directory on the SFTP server where the file will be placed. You can browse for the target directory, or use a forward slash to indicate the file will be saved in the root directory.

Before you execute this project for the first time, there is one more logging feature you want enable. Click on the Project component in the Project Outline, and then select the Control tab.

The Log Level field on the Control tab allows you to specify the level of log messages that are generated. While designing and testing a project, the debug log level provides useful information. Once the Project is running as you intended, you can lower the log level to minimize the amount of logs generated.

Press the Execute button. The Project will compile, automatically save, and then execute. Once the project has executed, a View Job Log link is displayed. You can review the log, or download it as a text file which can then be emailed to tech support if requested. Click the Done button to return to the Project Designer, and then click Exit to return to the Project Manager.

Project Templates

Templates

While you created a Project from scratch by choosing the specific Tasks needed complete the workflow, Projects can also be created by using one of the included GoAnywhere templates. Using a template is generally the fastest approach for creating a Project, since each template contains a pre-defined group of Tasks for performing commonly used business processes.

Create a Project, and then find a template that is close to the business process you want to automate. Select the template and save the project. Then you simply need to modify the project to fit your needs.

Additional Project Assistance

Lastly, the GoAnywhere User Guide contains hundreds of project examples in the Task Reference and Project Design topics. Click on the question mark symbol from any task within the Project Designer to view that task's detailed help and examples.