FME Server Tutorial
FME Server Tutorial
Tutorial
FME 2014 Edition
FME Server Tutorial
In no event shall Safe Software Inc. be liable to anyone for special, collateral, incidental, or consequential damages in
connection with or arising out of purchase or use of these materials. The sole and exclusive liability of Safe Software
Inc., regardless of the form or action, shall not exceed the purchase price of the materials described herein.
This manual describes the functionality and use of the software at the time of publication. The software described
herein, and the descriptions themselves, are subject to change without notice.
Data Sources
City of Vancouver
Unless otherwise stated, the data used here originates from open data made available by the City of Vancouver, British
Columbia (data.vancouver.ca). It contains information licensed under the Open Government License - Vancouver.
Others
Forward Sortation Areas: Statistics Canada, 2011 Census Digital Boundary Files, 2013. Reproduced and distributed on
an "as is" basis with the permission of Statistics Canada. © This data includes information copied with permission from
Canada Post Corporation.
Fire Hall Data: Some attribute data adapted from content © 2013 by Wikipedia
Stanley Park GPS Trail: Used with kind permission of VancouverTrails.com. See
http://www.vancouvertrails.com/trails/stanley-park/.
Copyright
Revisions
Every effort has been made to ensure the accuracy of this document. Safe Software Inc. regrets any errors and
omissions that may occur and would appreciate being informed of any errors found. Safe Software Inc. will correct any
such errors and omissions in a subsequent version, as feasible. Please contact us at:
Safe Software Inc. assumes no responsibility for any errors in this document or their consequences, and reserves the
right to make improvements and changes to this document without notice.
Trademarks
FME Server Tutorial
FME® and SpatialDirect are registered trademarks of Safe Software Inc. All brand or product names aretrademarks or
registered trademarks of their respective companies or organizations.
Document Information
Contents
Introduction 5
FME Server Basics 13
Basic FME Workspaces 23
Introduction to Self-Serve 31
Using Parameters 43
Getting Started with Real Time 58
Getting Started with Automation 70
FME Server Tutorial
Introduction
This tutorial is a basic introduction to using FME Server, either on your own installation or on
FME Cloud. In particular it focuses on content that all users of FME Server would be expected to
know.
FME Server is a model-driven application. Authoring and publishing these data translation and
transformation models (also known as workspaces) uses FME Desktop applications; therefore
the contents of this tutorial require that you have a basic understanding of FME Desktop. If this
is not the case it is recommended that you carry out the FME Desktop Tutorial, before
proceeding with these examples.
FME Version
The tutorial is designed specifically for use with FME®Server 2014 and FME®Desktop 2014.
Some of the functionality described may not be available when used with older FME versions.
Contents
The basic FME Server tutorial consists of a number of chapters, each with its own topic and set
of exercises. Advanced topics - principally techniques specific to a particular scenario - are
covered in a separate set of tutorial documents.
This chapter describes the basic functionality of FME Server and explains the use of the Web
Interface.
This chapter explains how to open an existing workspace model, publish (upload) it to
FME Server, and execute it in the FME Server Web User Interface.
Introduction to Self Serve
Often administrators need to serve data to both customers outside of their organization (end-
users) and internal customers (co-workers). This chapter demonstrates how FME Server
services can be used for this purpose.
Introduction 5
FME Server Tutorial
This chapter explains how to give control of FME Server translations to the end-user, through
FME Workbench functionality known as Published Parameters.
Getting Started with Real Time
Automation is a common requirement for FME Server installations that are used to do data
processing. This chapter covers the basics of setting up automated translations on FME Server.
Introduction 6
FME Server Tutorial
Software Requirements
A private installation of FME Server is not a requirement for use of this tutorial.
For your convenience a public installation of FME Server, utilizing FME Cloud, has been made
available at fmecloud.com, for use by anyone following this tutorial.
To use the instance on fmecloud.com you should ensure you can connect to, and see the login
page for: http://server-tutorial-safe-software.fmecloud.com/
Be aware that any tutorial repositories, workspaces or related data will be removed
regularly from fmecloud.com.
If you want to keep any work or data from this tutorial, please also save it to your
own system!
Of course, you are welcome to use your own private installation of FME Server instead,
provided the following requirements are met:
l
You are using FME Server 2014, and it has been properly installed and tested.
For installation information please see the FME Server Administrators guide available on
our website: FME Server Administrator's Guide (HTML)
l
You have installed the FME Server Samples and Template Workspaces.
Start > All Programs > FME Server > Install > Add Sample Workspaces > Add
Template Workspaces
When using your own FME Server installation, rather than fmecloud.com, there will be some
obvious differences.
Introduction 7
FME Server Tutorial
l
Browser URLs will be specific to your own system:
http://<HostName>:<portNumber>/fmeserver
l The connection parameters from FME Workbench will be specific to your own system.
l You will need to create the Tutorial repository when you publish your first workspace.
The author user is a default user installed with FME Server. If the default users and
roles have been changed, you need to ask your own FME Server Administrator for a
user name and password.
Introduction 8
FME Server Tutorial
FME Desktop
FME Desktop is used as the authoring environment for FME Server and is therefore a
requirement for this tutorial.
If you do not have a licensed copy of FME Desktop, you can request a trial copy from our
website.
Google Earth
Google Earth is not strictly a requirement for this tutorial, but is useful for viewing some of the
exercise output.
Carrying out the exercises in this tutorial requires a set of data available from the Safe
Software web site.
There are two datasets available. One is a full dataset with nearly 500mb of example data. The
other is a 100mb subset specifically for the FME Desktop and Server tutorials.
The Tutorials dataset is all you need to complete the exercises in this document; however the
Full dataset has a wider range of formats and data types that you may find useful to
experiment with.
Download your chosen set of FME sample data and extract the contents.
Where possible, choose the root folder of the C:\ drive to extract the data.
Introduction 9
FME Server Tutorial
Choosing a different location than C:\ will not prevent you from using this tutorial, but
predefined translations within the FMEData folder will require editing to locate the
data.
Completed versions of the workspaces used in this tutorial can be found here:
C:\FMEData\Workspaces\ServerTutorial.
Introduction 10
FME Server Tutorial
What’s Next?
First Step
Now that you know something about this tutorial, and the pre-requisites required to follow it,
your first step is to proceed to the next chapter, FME Server Basics.
Getting Help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Introduction 11
FME Server Tutorial
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
Introduction 12
FME Server Tutorial
This chapter describes the basic functionality of FME® Server from a user’s
point of view, and explains the use of the Web User Interface.
FME Server is a model-driven Spatial ETL application for translating and transforming spatial
data over a network. It allows organizations to read, restructure, and distribute their data
across the widest range of spatial data formats; and so offers a flexible, cost-effective
approach to meeting the ever-increasing demands for spatial data access.
In particular, the tasks that can be carried out by FME Server include the following:
In the chapters that follow, you can explore most of the functionality, and work through
examples designed to help you become familiar with FME Server.
Users interact with FME Server through client applications. There are many pre-existing
applications – from both Safe Software and other sources – that can act as clients for FME
Server.
The FME Server product itself offers a number of clients capable of interacting with the core
server. These clients include:
l FME Workbench
l FME Data Inspector
However, with FME Server you are not limited to FME clients, or even the other clients shown in
the following illustration. You can create your own with one of the available APIs.
Working through this tutorial, will help you learn how to use these clients to interact with FME
Server.
FME Server is easier to understand when you divide its use into two different roles: author and
end-user. The author generates the solution models (workspaces) through which the end-user
(typically coworkers or customers) access, upload, or process spatial data.
For example:
l An author has created a workspace to read data from a spatial database, to reproject it
to a different coordinate system, and to write it out.
l The workspace has been published to FME Server, and identified as a Data Download
service.
l The end user accesses the Data Download service through a web page in which they
define the required coordinate system and/or format of the output dataset.
l The workspace runs on FME Server. The user is presented with a URL through which to
download the data in their chosen output.
This workflow is consistent, and the techniques used identical, whether or not you are using
your own installation of FME Server, or an instance that is running under FME Cloud.
FME Server ships with a comprehensive web interface. This interface can be used to carry out
all the administrative and functional tasks required of FME Server; including running or
scheduling tasks, managing security settings, and setting up notifications and alerts.
Data N/A
Follow these steps to use the default FME Server web interface to download some data from a
Data Download service.
This will open the web interface login screen for the FME Server being used. Bookmark this web
address, since you will use this link quite often.
If you are using your own FME Server, please read FME Server – Private Installation
in the previous chapter.
If you are connecting to the internet using a proxy and you are having trouble
connecting, contact Support at www.safe.com/support.
3) Examine the user interface. Notice that the bottom-left corner shows which version and
build of FME Server is being used by this instance:
Also notice a section of the interface that shows how many engines are running:
4) Let's look first at the system's repositories. Check the list of items on the left-hand menu
(this list will vary depending on what permissions you have) and click the link labelled
Repositories. This will open a page that shows a list of the available FME Server repositories.
5) Click on the Samples repository. A list of workspaces in that repository is shown. These are
workspaces that have been loaded into FME Server and are available to run.
6) Now click on the Jobs entry on the menu. This tool shows you a list of jobs that have been
run on the system, as well as jobs that are currently queued or currently running.
Jobs and Repositories are the two main menu items that you will use for basic FME Server use
and administration.
Congratulations!
l You have now logged in and used the web interface on FME Server.
l Later chapters cover how to use the functionality contained within these
menus.
Conclusion
Next Step
Now that you have completed this chapter,your next step in the FME learning program is to
continue to the next chapter, Basic FME Workspaces.
Getting Help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
FME Server is a model-driven Spatial ETL application. The models - aka workspaces - are
created using a desktop application called FME Workbench.
This chapter of the tutorial demonstrates how to use FME Workbench to open and publish a
workspace to FME Server, and how to run that workspace through the FME Server web
interface.
Overall Goal Open an existing workspace that translates data. Publish it to FME Server. Run the
workspace.
1) Start FME Workbench
From the Windows Start Menu, select Start > All Programs > FME Desktop
> FME Workbench.
2) Open Workspace
In the Getting Started section of the Workbench Start page, click on the option to Open
Workspace.
As a Spatial ETL tool, FME permits transformation (T) between reading and writing data. This
workspace transforms the data by dividing it into parks with and without off-leash dog runs. It
also calculates the area (in square metres) of each park and the length (in metres) of bicycle
path that runs through it.
NB: For more information on this workspace and how it was generated, refer to the
FME Desktop Tutorial document.
3) Publish to FME Server
When prompted in the publishing wizard, select a Web Connection and enter the URL:
http://server-tutorial-safe-software.fmecloud.com/fmeserver
Enter the username and password as previously used to log in to the FME Server web interface:
Click the Next button. Next select the Tutorial repository in which to store the workspace.
Rename the workspace to something suitable - maybe something with your name to avoid
clashing with other users.
Again click the Next button. The final step is to register what services to record the workspace
against. For now, simply leave Job Submitter selected and click Publish. The workspace is
published to the FME Server.
4) Run Workspace
The translation will now run. The data will be read from a PostGIS database, transformed, and
then written back to two new tables.
Conclusion
Next Step
Now that you have completed this chapter,your next step in the FME learning program is to
continue to the next chapter, Introduction to Self-Serve.
Getting Help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
Introduction to Self-Serve
The FME Server Data Download service is ideal for delivering data to your end-
users.
Self-Serve
Often administrators provide access to data to both customers outside of their organization
(end-users) and internal customers (co-workers). The FME Server Data Download service is
ideal for letting users serve themselves with data.
Introduction to Self-Serve 31
FME Server Tutorial
Overall Goal Create a workspace for use in a Data Download service, so that users can help
themselves to data
In this exercise, imagine that you are a GIS technician working for a city planning department.
You often get asked for the location of fire halls in Google Earth (KML) format and you want
your users to be able to help themselves to this data using FME Server.
1) Start FME Workbench.
From the Windows Start Menu, select Start > All Programs > FME Desktop
> FME Workbench.
FME Workbench will now start up and the Start screen will open.
2) Open Workspace.
In the Getting Started section of the Workbench Start page, click on the option to Generate
Workspace.
Introduction to Self-Serve 32
FME Server Tutorial
The Generate Workspace dialog will open. When it does fill in the fields as follows:
Introduction to Self-Serve 33
FME Server Tutorial
3) Add Transformer.
Click on the connection between the Reader and Writer objects in the Workbench canvas (we
call these objects "Feature Types").
Start typing the word KMLStyler, the name of the transformer we wish to use. As you type the
list of matching transformers becomes shorter until this one is visible. Click on KMLStyler to
accept it.
Introduction to Self-Serve 34
FME Server Tutorial
All transformers have a set of parameters that can be set. To check and set the parameters for
this transformer, click on the cog icon:
The Fire Hall features are all point geometries, meaning you should expand the Icon section of
the parameters dialog.
Use the browse button to select icon "03." Set the color to be bright red.
Introduction to Self-Serve 35
FME Server Tutorial
As an (optional) task to improve the output, repeat steps 3 and 4, this time inserting a
KMLPropertySetter transformer.
This time, for parameters simply click the drop-down arrow next to the Name parameter,
choose attribute value, and then choose the attribute "Name."
This will cause the name of the fire hall to be used in the Google Earth display.
Click the Save button on the toolbar to save the workspace. Name the workspace as something
suitable - maybe something with your name to avoid clashing with other users.
Now click the green run button to run the workspace. Locate the output KML file and open it in
Google Earth to ensure it is correct:
Introduction to Self-Serve 36
FME Server Tutorial
7) Publish to FME Server.
When prompted in the publishing wizard, select a Web Connection and enter the same
parameters as before:
URL: http://server-tutorial-safe-software.fmecloud.com/fmeserver
Username: Tutorial
Password: TruthAndBeauty
Introduction to Self-Serve 37
FME Server Tutorial
Click the Next button. Next select the Tutorial repository in which to store the workspace.
This time, because the data is local, and not on a database on the server itself, we will have to
upload the files for the workspace to run. The way we will do this here will make the data
private, for use only by this workspace.
Click the button labelled "Resources." In the Resources dialog click the Edit button next to the
source data parameter and check the option marked "Upload to Repository."
Introduction to Self-Serve 38
FME Server Tutorial
Click OK, and then OK again to return to the publishing wizard. Then click the Next button.
The final step is to register what services to record the workspace against. This time uncheck
Job Submitter and check the box marked Data Download.
Now click the Publish button. The workspace and source dataset are published to the
FME Server.
8) Run Workspace.
The translation will now run. The data will be read from a PostGIS database, transformed, and
then written to a zip folder ready for download. A URL to the output will be provided:
Click on the link to download the file. Unzip the data and open it in Google Earth to prove it is
correct. Now your colleagues will be able to log on to FME Server and download the data as
KML whenever they require.
Introduction to Self-Serve 39
FME Server Tutorial
Introduction to Self-Serve 40
FME Server Tutorial
Conclusion
Next Step
Now that you have completed this chapter,your next step in the FME learning program is to
continue to the next chapter, Using Parameters.
Getting Help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Introduction to Self-Serve 41
FME Server Tutorial
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
Introduction to Self-Serve 42
FME Server Tutorial
Using Parameters
When you author a workspace for FME Server you can give your users as much control over the
transformation settings as you want. This is particularly useful for creating a Self-Serve
solution.
Settings in FME are called parameters. A parameter that is made available to the end-user to
set is called a User Parameter.
User Parameters
Self-serve solutions commonly make use of Published Parameters, so that the end-user can
make decisions on the format and structure of the data they are downloading.
Typically the layers of data to be downloaded are defined by a parameter called Feature Types
to Read.
The output coordinate system is defined by the writer coordinate system parameter, linked to a
user parameter to present the end-user with a list of useful choices.
The output format of the data is most efficiently achieved using the Generic Writer.
The extent of the data can be defined by Reader search envelope parameters.
The Generic Writer is an FME writer whose format is not determined until run time.
Using Parameters 43
FME Server Tutorial
It has a generic definition in the workspace and a parameter through which to define the
chosen format. By publishing that parameter the end-user is able to choose which format of
data to write, and hence what format of data is supplied by their data download.
Using Parameters 44
FME Server Tutorial
Overall Goal Create a self-serve solution that lets users pick the contents, format and coordinate
system.
In this exercise, imagine that you are a GIS technician working for a city planning department.
You often get asked for Community Mapping data. However, each user wants the data in
different formats, so you must create a self-serve solution that lets them customize the output.
1) Start FME Workbench
From the Windows Start Menu, select Start > All Programs > FME Desktop
> FME Workbench.
FME Workbench will now start up and the Start screen will open.
2) Open Workspace
In the Getting Started section of the Workbench Start page, click on the option to Generate
Workspace.
The Generate Workspace dialog will open. When it does fill in the fields as follows:
Using Parameters 45
FME Server Tutorial
Be sure that the Reader format is the File Geodb API version (NOT ArcObjects) else the
workspace will not run on FME Server. Click OK to accept these parameters.
You will now be prompted which feature types (layers/tables) should be added to the
workspace. Leave all selected and click OK.
Using Parameters 46
FME Server Tutorial
Now let's create a published parameter for the end user to select the output format.
In the Navigator Window (usually the left-hand part of the Workbench dialog) right-click on the
section marked User Parameters. Choose the option to Add Parameter.
In the dialog that pops up select Choice with Alias as the parameter type.
Enter "OutputFormat" as the parameter name. Enter "Output Format" as the prompt. Then click
the button to the right of the Configuration field:
Using Parameters 47
FME Server Tutorial
In this dialog we can define which formats we want the user to have access to. Do this by
clicking Import > Writer Format(s). In this selection dialog select several formats, such as
AutoCAD, Esri Shape, GML, and MapInfo TAB (MITAB). Click OK to close the dialog.
Click OK again and then once more to close all remaining dialogs.
Now we have created a user parameter (i.e. we have a way for the user to make a choice) we
must assign this to an existing Writer.
In the Navigator Window again, locate the Generic writer and expand the parameters section.
Locate the parameter for Output Format.
Using Parameters 48
FME Server Tutorial
Right-click the Output Format parameter and choose the option to "Link to User
Parameter." When prompted select our newly created user parameter (OutputFormat) to link it
to. It should now look like this:
As an (optional) task let's give the user the ability to select an output coordinate system.
Repeat step #3. This time name the parameter "CoordinateSystem" and prompt for
"Coordinate System."
Using Parameters 49
FME Server Tutorial
This time, in the configuration dialog, choose to import coordinate systems instead of writer
formats. This will give the user the ability to select a coordinate system. Choose some common
systems like LL84 and UTM83-10.
If you created the Coordinate System parameter in step #5 it must now be assigned to the
appropriate Writer.
Again locate the Generic writer and expand the parameters. Locate and right-click the
parameter for Coordinate System. Select "Link to User Parameter" and when prompted select
the newly created "CoordinateSystem" parameter. It should now look like this:
Now let's allow the user to select which feature types (layers/tables) he wants to read from the
source data. This has a special parameter that we can set up in a single step.
Using Parameters 50
FME Server Tutorial
In the Navigator window locate the Geodatabase Reader and expand its parameters, basic and
advanced. Locate the advanced parameter called Feature Types to Read:
Right-click that parameter and choose "Create User Parameter." This opens a dialog in which
the list of available tables are defined. This is a special dynamic parameter, so that if the
source data changes the list will change too.
Using Parameters 51
FME Server Tutorial
8) Publish to FME Server
Save the workspace (File > Save) and publish the workspace to FME Server (File > Publish
to FME Server).
When prompted in the publishing wizard enter the same parameters as before:
URL: http://server-tutorial-safe-software.fmecloud.com/fmeserver
Username: Tutorial
Password: TruthAndBeauty
Click the Next button. Next select the Tutorial repository in which to store the workspace. This
time we'll use data that is already stored as a Shared Resource on FME Server, so simply click
the Next button to continue.
The final step is to register what services to record the workspace against. Again, uncheck Job
Submitter and check the box marked Data Download.
Now click the Publish button. The workspace and source dataset are published to the
FME Server.
9) Run Workspace
Using Parameters 52
FME Server Tutorial
A set of options are now provided. For the source data browse to Data > Tutorial and select
CommunityMap.gdb.
Below are a number of other parameters. Ignore the destination directory (we'll be doing a
data download instead) but use these parameters to select an output format, output coordinate
system, and a list of feature types to read:
Click the Show Developer Info button. This will display a selection of useful information if you
wish to create a custom web page for your end users. This will prevent them having to log in to
FME Server through this interface and give them a shortcut to downloading the data.
Using Parameters 53
FME Server Tutorial
Finally, click on the Run Workspace button. Click on the link to download the file. Examine the
data to prove it is correct. Now your colleagues will be able to log on to FME Server and
download the data as any format they want, whenever they require.
Using Parameters 54
FME Server Tutorial
Proxy Settings
Before starting work with FME Workbench, note that users communicating from FME
Workbench to FME Server through a proxy are required to define a number of settings.
If you are using a proxy connection then carry out the following steps before using Workbench
with FME Server.
1) Start FME Workbench and select Tools > FME Options from the menubar.
Using Parameters 55
FME Server Tutorial
Conclusion
Next Step
Now that you have completed this chapter, your next step in the FME learning program is to
continue to the next chapter, Introduction to Real-Time.
Getting Help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Using Parameters 56
FME Server Tutorial
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
Using Parameters 57
FME Server Tutorial
Getting Started with Real Time
Notifications
This chapter provides instructions for receiving and sending real-time messages with FME
Server.
Incoming messages can be used to trigger a translation, and outgoing messages can be sent in
response to a particular state in a translation.
Handling messages in this way permits FME Server translations to be triggered by – for
example – sensors, which monitor a process and deliver a message once a particular event
occurs. FME Server can then manipulate that message spatially (within a workspace) and pass
on a notification to a user, for example on a mobile device such as a cellphone.
Getting Started with Real Time 58
FME Server Tutorial
Overall Goal Create a notification system that responds to an email by running a workspace
In this exercise, imagine that you are a GIS technician working for a city planning department.
You've been asked to set up a service where the public is provided with a list of parks in their
neighbourhood. You decide to set this up using the FME Server Notification Service.
1) Create Topics
Click on the menu item labelled "Notifications." This opens the parameters for the Notifications
Service, at first in the Topics tab.
A topic is a theme or subject of notification. We'll need to create two topics; one for incoming
messages and one for outgoing. Click the New button.
Create a topic with the name "<YourName>-Incoming." It's important to use your name to
create a unique topic name. Otherwise you'll get alerts from other users' notifications.
Getting Started with Real Time 59
FME Server Tutorial
Click OK to create the topic. Now click the new button again and create a second topic called
"<YourName>-Outgoing."
2) Create Publication
Click on the Publications tab and then click the New button:
Getting Started with Real Time 60
FME Server Tutorial
This means that the topic <YourName>-Incoming will be triggered when you send an email to
<YourName>@server-tutorial.safe-software.fmecloud.com.
3) Create Subscription
Now click on the Subscriptions tab and locate an existing Subscription called ServerTutorial-
Subscription.
Click the check box next to this and then choose the Duplicate button:
Getting Started with Real Time 61
FME Server Tutorial
This will create a new notification, with all of the existing settings, and just a few to change.
Getting Started with Real Time 62
FME Server Tutorial
This means that the topic <YourName>-Outgoing, when triggered, will cause an email to be
sent to you.
4) Open Workspace
Start FME Workbench. In the Getting Started section of the Workbench Start page, click on the
Open option. Open the workspace C:\FMEData2014\Workspaces\ServerTutorial\Exercise5a-
begin.fmw.
Notice that this workspace reads an email, and uses the subject line of the email to filter a set
of Neighbourhood features. A Clipper transformer is used to determine which parks are located
inside (or overlap) the chosen neighbourhood.
5) Publish to FME Server
Let's publish the workspace to FME Server, setting it up to interact with the newly created
notifications while we do.
When prompted in the publishing wizard, select a Web Connection and enter the same
parameters as before:
URL: http://server-tutorial-safe-software.fmecloud.com/fmeserver
User name: Tutorial
Password: TruthAndBeauty
Getting Started with Real Time 63
FME Server Tutorial
Click the Next button. Next select the Tutorial repository in which to store the workspace.
Rename the workspace to <YourName>-Notifications.fmw.
Click the button labelled "Resources." In the Resources dialog click the Edit button next to the
Google Earth source data parameter and check the option marked "Upload to Repository"
Now click the Edit button for the MapInfo TAB file and check the same option. There is no need
to do the same for the Text File, as its content will come from a notification email.
Click OK, and then OK again to return to the publishing wizard. Then click the Next button.
The final step is to register what services to record the workspace against. This time check Job
Submitter and Notification Service. Click the Edit button for the Notification Service to open a
dialog for editing its parameters.
The Subscribed Topic will be <YourName>-Incoming, so that when the topic is triggered by an
email, the workspace will run. Set test [TEXTLINE] to be the Notification Reader (i.e. the email
content will be sent to that Reader) and leave the Content Format as JSON.
Now open the advanced parameters. Set the Topic to Publish (Success) as <YourName>-
Outgoing. Set the Notification Writer to OutputInfo [TEXTLINE].
Getting Started with Real Time 64
FME Server Tutorial
What this does is tie the workspace into the Notifications. When <YourName>-Incoming is
triggered, the workspace will be run to create a list of parks. When it is complete, the
<YourName>-Outgoing topic is triggered in order to send out an email.
6) Monitor Notification
7) Run Process
The Subject line should be the name of a neighbourhood in Vancouver. Possible ones are:
l Kitsilano
l FairviewWest End
l Downtown
Getting Started with Real Time 65
FME Server Tutorial
l Strathcona
l Mount Pleasant
When the email arrives <YourName>-Publisher triggers the <YourName>-Incoming topic. This
is shown in the monitoring page.
The uploaded workspace runs (because it was tagged to listen for <YourName>-Incoming) and
searches for parks in the neighbourhood specified in the email subject line. When it is complete
triggers the <YourName>-Outgoing topic. :
Getting Started with Real Time 66
FME Server Tutorial
<YourName>-Subscription now starts and sends an email out with the results of the
workspace.
Getting Started with Real Time 67
FME Server Tutorial
Conclusion
Next Step
Now that you have completed this chapter, your next step in the FME learning program is to
continue to the next chapter, Introduction to Automation.
Getting help
FME Workbench includes extensive, context-sensitive help. For assistance with a tool or
format, click the item and then press F1 to open the help system.
Further Resources
Below is a list of other technical resources to help you make the most of FME and FME Server.
Sales
To obtain an evaluation copy or for sales enquiries, please contact your Safe Software Account
Manager or sales@safe.com.
Getting Started with Real Time 68
FME Server Tutorial
Training
Safe Software offers a number of training courses in FME Workbench and FME Server. For
more information, see our website at http://www.safe.com/training.
Documentation
The FME Server Administrator’s Guide is available with every FME Server installation and
online at our website: FME Server Administrator's Guide (HTML).
Technical Resources
Many other resources for FME Desktop and Server can be located at http://fmepedia.safe.com.
Support
If you need assistance with the tutorial or have any other technical questions about FME
Server, please feel free to contact the FME support team through the contact form on their web
site at: www.safe.com/support.
Getting Started with Real Time 69
FME Server Tutorial
Getting Started with Automation
Scheduling
This chapter provides instructions for scheduling jobs to be run on FME Server.
Jobs can be scheduled from the FME Server web interface, so that they can be run at a specific
time and date. They can be set up to run once or to run multiple times.
Jobs can also be activated directly from within FME Workbench - for example a workspace can
be run in Workbench to test for certain conditions and then run a workspace on FME Server in
response.
Getting Started with Automation 70
FME Server Tutorial
In this exercise, imagine that you are a GIS technician working for a city planning department.
Daily work edits are committed to the database each day at a set time. You've been asked to
set up FME Server to automatically process those edits to produce the correct output.
1) Create Schedule
Click on the menu item labelled "Schedules." This opens the parameters for the scheduling
service.
Create a schedule with the name "<YourName>-Schedule." It's important to use your name to
create a unique name. Select (or enter) Tutorial as the Category. Enter a description if you
wish.
Getting Started with Automation 71
FME Server Tutorial
For the workspace select the Tutorials repository. Select the Exercise2-Begin.fmw workspace.
The 'Topics to Publish' part can be left as it is (empty).
For the Schedule itself, click the check box to run the task immediately. To get a result that can
be quickly proved to work, set 'Repeat Unit' as seconds and end 15 as the interval. Uncheck the
'End Date' Never box. In the section provided enter the current date and a time about 3 or 4
minutes into the future:
Getting Started with Automation 72
FME Server Tutorial
Note that this recognize your own local time. Just be sure not to let it run continuously!
2) Check Logs
To prove that the workspace is running on schedule, click on the Jobs entry in the menu:
Look under the Completed tab for evidence that the jobs are running successfully:
Getting Started with Automation 73
FME Server Tutorial
NB: It's unlikely you'll see a job under the Queued or Running tabs, as the workspace only
takes a second to run.
3) Check Schedule
Once the schedule is complete the jobs should stop being processed.
Return to the Schedules dialog and you will find that the completed schedule has been
removed.
4) Create Workspace
Another way to running a workspace on FME Server is via FME Desktop. Taking the same
scenario as above, you wonder whether, if database changes are committed via FME Desktop,
can that same workspace trigger the FME Server process?
Start FME Workbench. In the Getting Started section of the Workbench Start page, click on the
Blank Workspace option. A new (empty) workspace is now created.
5) Add Transformers
Add a Creator transformer to the workspace by typing "Creator" on the canvas. Repeat the
process to add an FMEServerJobSubmitter transformer.
Getting Started with Automation 74
FME Server Tutorial
Open the FMEServerJobSubmitter parameters dialog. Enter your authentication details as if you
were publishing the workspace and click Next.
Click Next. A Job Parameters dialog will open up. These can be left as the default values.
Click Finish to close the dialog.
6) Log Workspace
Getting Started with Automation 75
FME Server Tutorial
These will help us track what is happening when the workspace is run.
7) Run Workspace
Press the Run button to run the workspace. The workspace will cause the chosen translation to
run on FME Server and a feature should emerge from the Succeeded port of the
FMEServerJobSubmitter.
Getting Started with Automation 76
FME Server Tutorial
In FME Server check the Jobs (Completed) dialog. The workspace that was just run will have an
entry in the list.
Getting Started with Automation 77