FME Version
Files
Introduction
With FME 2022.2 and newer, we have the capability of building automation apps on top of automations, which enables users to run complex workflows. As an FME Flow (formerly FME Server) author, creating an app from an automation will allow other users in my organization to easily leverage the automation workflows by configuring a series of input parameters.
In this tutorial, we’ll be using a modified version of the Automation from Job Orchestration with Automations as a starting point to demonstrate how you can build an Automation app off of a multi-action Automation. The Split-Merge Block (County Level Scenario) Automation takes user input of an American state name and processes messages from the state level to the county and block levels. The automation includes a trigger, five workspaces, and a split-merge block. In order to publish it to an automation app for users to run, we will be editing the automation from an FME Flow Schedule (initiated) trigger to a Manual Trigger (max 1 per Automation).
Disclaimer: The Split-Merge Block Automation triggers 12 jobs. Please be mindful before running the automation app too many times. The automation separates jobs to be processed by many engines in parallel, therefore this tutorial is recommended for FME Flows with at least more than one engine. For more information on the Split-Merge Block Automation, please see Job Orchestration with Automations.
Step-by-Step Instructions
This tutorial can be broken down into two parts. Part 1 prepares an automation to be used with an automation app. Part 2 demonstrates creating an automation app from that automation.
Part 1: Edit the Automation
This part of the tutorial configures the manual trigger to allow end-user to use their own parameters in the automation app.
1. Download and Import FME Flow Project
From the downloads section above, download the linked FME Flow project Split-Merge Block (County Level Scenario)_Begin.prj and import into your FME Flow by clicking Projects > Manage Projects, then Import.
Note: If you would like to skip to the completed Automation, please download the linked FME Flow project Split-Merge Block (County Level Scenario)_Part1Complete.prj and go to Part 2: Build Automation App.
2. Reconfigure Automation
From the FME Flow web interface, go to Automations > Manage Automations and select the imported Split-Merge Block (County Level Scenario) Automation.
a. Once you select the automation, it will open the canvas to edit the Automation. If you find that your automation canvas is cluttered with guides for Next Action, click the drop-down Menu on the top left corner and select Hide Guides. Double-click on the green FME Flow Schedules trigger to open the details panel. Change the trigger to Manual Trigger (max 1 per Automation).
b. Once Manual Trigger (max 1 per Automation) is selected, click the Output Attributes tab. Click on the Manage button, beside Manual Parameters. In the Editor, click the + button to add a Manual Parameter. Select Text and fill in the parameters:
-
Parameter: State
-
Prompt: Enter State
-
Required: Enabled
-
Default Value (optional): <leave blank>
Click OK to save the State Attribute and click Apply to save manual trigger.
c. Double-click the first action, ProcessState workspace, to open the parameter editing panel. Change the State (optional) default California to "manual.State" by clicking the drop-down arrow and scrolling to Manual > manual.State. Leave Population (optional) empty for now. Click Apply.
d. Click the save icon on the top ribbon and Start Automation.
Part 2: Build Automation App
This part of the tutorial creates the Automation App from the automation built in Part 1.
1. Ensure Automation is Started
Ensure the Automation is started by going to Automations > Mange Automations and confirm that the Started column has a green check mark for the Split-Merge Block (County-Level Scenario) Automation.
Note: If you downloaded the Split-Merge Block (County Level Scenario)_Part1Complete.prj, your Split-Merge Block (County Level Scenario) Automation should already be started.
2. Create Automation App Page
To build the Automation app, go to Flow Apps > Build Automation App. On the Create Automation App page, set the following parameters:
Name | Split-Merge-Block |
Title (optional) | Automation App Tutorial |
Description (optional) |
This automation app is built off of a manually triggered multi-workspace automation, Split-Merge Block (County Level Scenario). This workflow requires no input files and produces no output and is for demonstration purposes only. Please fill in an American state to run the app. |
Automation | Split-Merge Block (County-level Scenario) |
Expiration | Default “Will expire in 10 years” |
Allowed Users | <User/Role that should have access to app> |
For the Parameters section, ensure the State (optional) parameter is enabled. You may customize the app to your preference or leave as default and click OK.
Note: To learn more about customization options, check out Getting Started with Automation Apps.
3. Test the Automation App
a. Once you click OK, the URL to the newly created automation app is provided. Approved users with this URL will be able to run this app. Under App Security, a link to the automatically created token is provided, with its permissions listed below.
Test the Automation App Tutorial by clicking the URL. Input an American state name, such as California, and click OK. You will be notified that it ran with the notification "Automation Triggered" at the top right corner of the app.
Back in the main FME Flow web interface, go to Jobs > Completed to see that the ProcessCounty.fmw, LogBlockMessage.fmw, and workspaces related to the automation have run. From the Completed page, the Ran By column will show who ran the workspace/automation app. If the Ran By field isn't visible, click on 'Customize Columns' and move the field from the Hidden to Displayed Columns list. This information may be useful for the FME administrator to collect statistics on who is running this app. You can also look at the automation log file from Automations > Manage Automations > Split-Merge Block (County Level Scenario) > Menu > View Log File.
b. It's also possible to test the automation app with a different user. Copy the URL and paste to a different browser. Check that you are presented with the login window. Log in as a different user that was granted permission, enter a state name and select OK to run the app.
Note: If you granted the account used to create the app access to run the app then you will need to first log out of FME Flow, or open the workspace app in an incognito browser to be presented with the login page again.
4. Check the Ran By User
Return to the FME Flow web interface and go to Jobs > Completed to look for the Ran By field.
Note: If the Ran By field isn’t visible, click on ‘Customize Columns’ and move the field from the Hidden to Displayed Columns list.
Congratulations, you’ve successfully created an Automation app.
Additional Resources
[Webinar] Automation Keys: What They Are and Why You Should Use Them
Comments
0 comments
Please sign in to leave a comment.