Which FME Flow Service Should I Use?

Liz Sanderson
Liz Sanderson
  • Updated

Introduction

If you’ve ever published a workspace from FME Form (formerly FME Desktop) to FME Flow (formerly FME Server), you’ve probably noticed that there is a dialog to register the workspace to a Service.

FlowRegisterServices.png

 

In total, there are five different services to choose from. This article will discuss the most commonly used Services; Data Download, Data Streaming, and Job Submitter service. For information on the KML Network Link or the Notification Service, see the linked documentation. 

 

Service

Action

Typical Use Case

Data Download

Returns results as a downloadable zip file

Used in self-serve scenarios. Users can request data and have the file returned to them directly.

Data Streaming

Streams the resulting file directly back to the client

Used in self-serve cases where the data can be streamed directly into the web browser. This is very helpful in a webpage or when the stream is in another application. Note: only certain formats support data streaming

Job Submitter

Runs the workspace and writes a file to the location specified in the writer

Used when the data is not needed immediately. Commonly used when writing to a database

KML Network Link Service

Accepts and carries out transformation requests as specified by a workspace, returning the results as a KML Network Link

Used when working in Google Earth

Notification Service

Pushes data to and from FME Flow in the form of messages when an event occurs.

Used when working FME Flow automations, notifications, publishers, or subscriptions

 

Data Download Service

The Data Download Service writes the output to a zip file and presents the user with a link to that file. This makes it ideal for self-serve because the data is delivered directly to the user. A typical application would be an organization that frequently provides data to either staff or customers. With a Data Download system, the user can fetch their own data immediately rather than having to put in a request with manual action required. This frees up the team to focus their time and efforts on more meaningful jobs and also ensures the end-user is receiving the information requested as quickly as possible.

 

An example of the Data Download Service can be found in our FME Flow Demos. Here a user can download data selected on the web map.
 

To test this out for yourself, follow the instructions below:

1. Run Workspace 
Log into FME Flow and navigate to the Run Workspace page. 
On the Run Workspace page, select the Samples repository. Then, under Workspace select earthquakesextrusion.fmw. Finally, in the Service drop-down, select Data Download. 
RunEarthquakesExtrusionWorkspace.png

Select Run at the bottom of the page to run the workspace under the Data Download Service.
 
2. Inspect Output
Once the workspace has been completed, you should see a URL that can be selected. This URL will download a zip file. This zip file contains a KML file which will automatically be opened in Google Earth (if installed) when selected.
DataDownloadComplete.png

 

Data Streaming Service

The Data Streaming Service is like the Data Download because they both provide users with direct access to files. However, the Data Streaming service streams the file directly back to the user.

 

If the Data Streaming URL for a workspace is posted into a web browser, the data will be automatically downloaded and opened in whatever application the browser associates with that file type (some data might open directly in the web browser itself). This FME Flow Demo is an example of Data Streaming. Notice that the results of the workspace are streamed directly back to the webpage.

 

For the Data Streaming URL to work properly, it has to be writing data that is file-based, not folder-based. Some of the common formats to stream include:

  • RSS

  • GeoRSS

  • GeoJSON

  • KML

  • HTML

  • JSON

  • XML

  • PDF

  • PNG

  • JPEG

 

To test out the Data Streaming Service, follow the instructions below:
 

1. Run Workspace 
Log into FME Flow and navigate to the Run Workspace page. 
On the Run Workspace page, select the Samples repository. Then, under Workspace select earthquakesextrusion.fmw. Finally, in the Service drop-down, select Data Streaming. 
RunEarthquakesExtrusionWorkspace_Streaming.png

Select Run at the bottom of the page to run the workspace under the Data Streaming Service.
 
2. Inspect Output
You should see a file is downloaded directly to your desktop. If you open the file, it should open the data directly in Google Earth. If we were streaming a file that could be opened in a browser such as an HTML file, then it would open directly in the browser.
DataStreamComplete.png
 

Job Submitter Service

The Job Submitter service is the most similar service to running a job in FME Workbench. The data will be written to the location specified in the writer.

 

To test out the Job Submitter service, follow the instructions below:


1. Run Workspace 
Log into FME Flow and navigate to the Run Workspace page. 
On the Run Workspace page, select the Samples repository. Then, under Workspace select earthquakesextrusion.fmw. Finally, in the Service drop-down, select Job Submitter. 
RunEarthquakesExtrusionWorkspace_Submitter.png

The resulting file is sent to the destination specified in the KML writer for the workspace.
JobSubmitterComplete.png

2. Find Destination
If your destination dataset is not a published parameter, to find where the data will be sent, we can open the workspace in FME Form. If it was a published parameter, skip to step 3. 

If the workspace is saved on your machine, browse to the workspace file location to open it in FME Workbench. Otherwise, you will have to download the workspace to your machine. From the Run Workspace page, click Workspace Actions then Download the workspace. Once downloaded, open the workspace in FME Workbench.
OpenWorkspace.png

Next, in the Navigator window, expand the Quakes writer information. The location of the output file is in the Destination parameter. 
WriterDestination.png

Alternatively, this information is also recorded in the job log. To view the job log, click View Details on the job completion confirmation page in step one, then scroll down to see the paginated log.
LogReview.png

3. Inspect Output 
If you set your destination in a published parameter, browse to that file location to confirm the file was output. 
If you did not set the destination in a published parameter, browse to the file location identified in either the Workspace or Log. In this case, engineresults. To do this, on the side menu navigate to Files & Connections > Resources. In the Resources folder navigate to System > temp > engineresults. If you have lots of files, search for Quakes.kml.
ResourcesTempLocation.png

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.