Publish a Workspace to FME Flow and Run It

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2023.0

Introduction

Welcome to the first tutorial of the Getting Started with FME Flow (formerly FME Server) series. In this tutorial, we will publish a workspace to FME Flow from FME Form (formerly FME Desktop) using FME Workbench. After it is published, we will move to FME Flow, where we will run the workspace and download the results.  If you do not have access to FME Form, please see the Uploading to FME Flow section of the documentation, then proceed to Part 2 of this tutorial.  
 

Step-by-Step Instructions

Part 1 of this tutorial assumes you have FME Form installed. If you do not have access to FME Form, please download the AddressesToNotify.fmwt from the Files section on this article, then follow the instructions in the Uploading to FME Flow section of the documentation. After the workspace has been uploaded to FME Form, proceed to Part 2 of this tutorial.  
 

Part 1: Publish a Workspace from FME Workbench to FME Flow

1. Open FME Workbench
Download the AddressesToNotify.fmwt workspace available in this article's Files section. Open FME Workbench (FME Form) and open the downloaded workspace.
Workspace.png

This workspace is compiling a list of customers to notify that were affected by a water pump failure. The workspace is reading a CSV containing information about local addresses in the city of Surrey, BC, as well as a shapefile containing a polygon area of interest where water service maintenance will occur. 

2. Run the Workspace
It is a good idea to run a workspace in FME Workbench before publishing it to FME Flow because, typically, if it doesn’t run in FME Workbench, it won’t run in FME Flow. Click on the green Run button to run the workspace. 
RunWorkspace.png


In the Translation Parameter Values dialog that appears, confirm the output location for the Destination Microsoft Excel File parameter. This will save the file to the same folder as the template workspace. If you want a different file destination, click the ellipsis [...] button (or file icon) and select a new folder. Click Run to finish running the workspace. 
Prompt.png

If the Translation Parameter Values dialog does not appear, you need to turn on Prompt for Parameters, accessed by the drop-down arrow next to the Run Button. After enabling Prompt for Parameters, click the Run button. The Translation Parameter Values dialog should appear, then follow the steps above to change the destination file location. 
PromptForParams.png

After running the workspace, review the Translation Log for the Translation was SUCCESSFUL message. If you did not receive this message, review the translation log for any red error messages and resolve them. 
TranslationLog.png


3. Publish Workspace to FME Flow
Now that we have confirmed the workspace works, we can publish it to FME Flow. With the workspace open, go to File > Publish to FME Flow on the top menu bar (FME 2022.2 or older: Publish to FME Server). 
Publish.png

a. Add Web Connection
In the Publish to FME Flow wizard, we will need to set up a new connection to FME Flow. Click the drop-down under FME Flow Connection and select Connect to FME Flow (FME 2022.2 or older: Add a Web Connection). 
ConnectToFlow.png

The following instructions are for a basic connection, but if your FME Flow is set up for Microsoft Azure, SAML, or Windows Credentials, please see the Using Web Connections to Connect to FME Flow documentation

An FME Flow Connection dialog will appear; here, we will need to set up the connection. The connection information and credentials can be obtained from your FME Flow Administrator. If you have not yet logged into FME Flow after installing, please do so prior to continuing, as you will be prompted to change the password from the default, which is admin as the username, and admin as the password. 

  • Web Service: FME Flow (FME 2022.2 or older: FME Server)
  • Server URL:  http://localhost or http://myservername/fmeserver  
  • Connection Name: Training FME Flow
  • Authentication: Basic
  • Username: <your username>
  • Password: <your password>

credentials.png

Click OK (FME 2022.2 or older: Authenticate). FME will try to authenticate the connection. Once authenticated, this connection will be available whenever you publish a workspace, so you only need to create the connection once. 

b. Create Repository
Now we need to create a new repository to contain our workspace. In FME 2022.2 or older, you will need to click Next to move to the next dialog. 
Next to Repository Name, click the New button to create a new repository. Enter Flow Training for the name, and you can optionally add a description if desired. Click OK to close the Create New Repository dialog. 
NewRepository.png

c. Upload Files 
For our workspace to run correctly, we need to upload the files. Enable Upload data files at the bottom of the dialog. After enabling it, it should state 5 files for upload. Then click Next. 
UploadFiles.png

When files are uploaded this way, they are stored within the repository. If you want to upload folder files (such as geodatabases) or specify where you want the files stored, the Select Files button allows you to do that.  See the documentation for more information. 
 
d. Register Services
One last step before we can publish the workspace, we need to register it with a service. A service will control how the data will be output after the workspace is run.

  • The services return results in slightly different forms:
  • The Data Download Service returns results as a downloadable zip file
  • The Data Streaming Service returns results as a data stream
  • The Job Submitter Service accepts and runs workspace job requests
  • The KML Network Link returns a KML Network Link that can be used in Google Earth
  • The Notification Service allows for event-driven messaging

 
We want to download our data after we run the workspace, so we will register with the Data Download Service. Enable Data Download Service (you can leave the Job Submitter enabled). Once enabled, click Publish.
Service.png

To confirm whether or not the workspace was published successfully, check the Translation Log. The Translation log will show which repository you published to, which files were included, and a quick link to run the workspace. 
PublishSummary.png
 

Part 2: Run the Workspace in FME Flow ​​​​​​​

1. Open the FME Flow Web Interface.
Log in to the FME Flow Web Interface using the same credentials that were used to create the Web Connection.  

2. Run the Workspace
Click on Run Workspace on the side menu. On the Run Workspaces page, click on the drop-down arrows for each section to select the workspace:

  • Repository: Flow Training
  • Workspace: AddressesToNotify.fmw
  • Service: Data Download

RunWorkspace-Flow.png

If there are any published parameters in the workspace, they can be set on the run workspace page. For this example, we can leave the Published Parameters as the default values. Click Run to run the workspace in FME Flow. 
PublishedParams-Flow.png

3. Review the Results Page
After the workspace has been run, there should be a successful translation with some summary information and a data download URL.
WorkspaceComplete.png

Click on the URL to download the zip file. Open up the zip file to confirm there is a Microsoft Excel file. 
Optional: Open the file in Microsoft Excel or in FME Data Inspector to review the output. 
Output.png

 

Continue Your FME Journey  

 

Interested in exploring another practical example similar to this tutorial?

 

Want to continue learning FME Flow basics?

  • The FME Academy is a guided, on-demand way to learn the entire FME Platform, and it's FREE! 

 

Interested in data integration and workspace authoring?

 

Have a specific question?

​​​​​​​

Data Attribution 

The data used here originates from data made available by the City of Surrey , British Columbia. It contains information licensed under the Open Government License - Surrey. 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.