Exercise 10 | Sharing Workspaces in FME Server |
Data | None |
Overall Goal | To use and understand Web Service URLs and FME Server Apps |
Demonstrates | How to create a Web Service URL and an FME Server App |
In the introduction to this chapter we discussed what Webhook URLs and FME Server Apps are. This is a quick exercise on how to create Webhook URLs and FME Server Apps in FME Server. FME Server Apps are a quick and easy way to share a workspace with a user that does not have access to FME Server.
In the second section of the course we will be creating our own apps with a custom interface using the REST API. However, in some cases FME Server Apps include all the functionality needed.
1) Go to your FME Server and select Run Workspace
Log into your FME Server and then select Run Workspace on the left hand menu.
2) Set up the Earthquakes Extrusion Workspace
Fill out the following parameters to set up the workspace.
Repository: Samples
Workspace: earthquakesextrusion.fmw
Service: Data Streaming
Then, open up the Advanced Tab and select Create a Webhook under Other Ways to Run this Workspace.
3) Create the token for the Webhook URL
For authentication, we need to create a token that will be used in the URL. This token can only be used to run the workspace and does not have access to other resources within FME Server. If Additional Permissions are needed, you can select them in the Additional Permissions section.
It is okay to accept the default token. Select OK to create the default token.
4) Test out the Webhook URL
Under Authorization with Query String, click the copy icon to copy the Webhook URL and paste it into a new browser tab.
Opening the Webhook URL will download the output from the workspace (in this case a kml file) directly. Since, there is no dialogue to set up the parameters, they have to be set within the URL itself. The Webhook URL would typically be used by a third party application. We will be demonstrating this in Exercise 17.
5) Open FME Server Apps Page
There are two ways to access the page to create an FME Server App. One is from within the Advanced section of the Run Workspace page.
The other way is by clicking on Server Apps from the menu on the left-hand side of the FME Server interface.
Open the page by clicking on Server Apps from the FME Server interface.
6) Create an FME Server App
Click Create to open the configuration page for building your FME Server App.
Give it a Name like MyServerApp and optionally add a Description.
Next, select the Samples Repository and earthquakesextrusion.fmw as the workspace to run. For Service, select Data Streaming and leave the Expiration at its default value.
7) Customize the App
Below the main app settings, there are sections for customizing the parameters that will be shown and the appearance of the app. Leave the Parameters as they are and under Customize Appearance, set the Title and Background Colour for your app.
Click OK to create the app.
8) Test out the FME Server App
A URL for your App will have been generated. Click on the URL (or copy and paste it into a new browser window) to open a page that will let you run the workspace.
This link can be shared with anyone to run the workspace. Click Run to run the workspace. This will download the kml file created by the workspace.
CONGRATULATIONS |
By completing this exercise you have learned how to:
|