span8
span4
span8
span4
Note: This article applies to FME Server 2019+.For FME Server 2018 and older,please refer toSchedule a Workspace to Run with FME Server.
Tutorial: Getting Started With Automations
In this scenario,the goal is to have FME Server automatically run a workspace,that extracts data from a database and refreshes a set of Shapefiles,on a daily basis.FME Server Automations makes this easy to set up.
We'll make use of the 亚搏国际在线官网CommunityMapping.fmw workspace already published to FME Server,which reads layers from a file geodatabase and writes out to one of four formats.
In part 4 of this tutorial,you'll learn how to set up an FME Workspace to run automatically on a schedule.
Please note that this video was created with FME Server 2019.0,the interface - and functionality - may vary in other versions of FME.
a) From the FME Server Web User Interface,click onAutomations,thenBuild.
This opens the Automations page.In the Get Started pop-up,click the Build tab.
b) Click Create New...to create a new Automation.
You'll be presented with a canvas already populated with a green Trigger node.Double click it.
c) Configure the Trigger node as a schedule
This Automation will eventually run daily at the same time,but for now,set it up to trigger immediately and then every 1 minute,just so we can see it in action right away.To do this:
Select the Trigger Event ‘Schedule initiated' from the drop-down menu.Parameter options will appear.Accept the default for Repeat On Interval.
Under Repeat Every,enter 1 and then select Minutes from the drop-down menu.
Start Immediately is checked by default.Leave this as-is.
Click Apply.Your Trigger is now configured!
d) Configure an Action to run the亚搏国际在线官网CommunityMappingworkspace.
Double click the silhouetted Next Action node downstream of your new Schedule Trigger.
Select Run a workspace from the drop-down menu.
Select the repository the workspace belongs in (Server Tutorial)
Select the亚搏国际在线官网CommunityMapping.fmwworkspace.
For output format selectEsri Shapefile.
Process all the layers in the workspace,so select all the options underFeature Types to Read.
Ignore the Output Keys and Advanced tabs.
ClickApply.Your Action is configured!
e) Save and Start Automation
ClickMenu>Save As.
Choose a name,e.g.ScheduledShapeUpdater.
Click + to add a Tag.Input ‘Server Tutorial' and clickOK.ClickOKagain.
ClickStart Automationin the upper right.
The Automations canvas should now be greyed out and display a message that the Automation is running.
f) Verify that the workspace runs
Since you left Start Immediately checked,亚搏国际在线官网CommunityMapping.fmw started running when you clickedStart Automation.To check the status of your Automation and its triggered jobs,you can do the following:
1.View the Automation Log
Click Manage under Automations in the left menu pane.
Click the check box next to your new Automation.The Actions button in the upper right becomes active.
Select Actions > View Log File.You will see a log of processes initiated by your Automation,including any jobs sent to the FME Engine.Time stamps can be shown by clicking the clock icon above the log on the right.
To aid in archiving or troubleshooting,a Download Log button is available in the upper right.Once you have made any changes to the Automation,it may be a good idea to Clear Log of any now-irrelevant errors and warnings after archiving the original log.
2.View Triggered Jobs and their logs
From the Automations > Manage page,select an Automation and then Actions > View Triggered Jobs.A list of only those jobs run by the selected Automation(s) appears.These jobs also appear in the main Jobs > Completed list.
Select any listed job to see its individual log.These logs can also be downloaded for archiving or sharing by clicking a button near the top of the log interface.
a) Stop the Automation
Running Automations cannot be edited,so to make any changes to your too-frequent test schedule,you must do one of the following:
1.From the Build page,select Menu > Open and choose your scheduled Automation.
Click Stop Automation in the upper right.
You are now ready to edit the schedule!
2.From the Manage page,click the check box next to your scheduled Automation.
Select Actions > Stop
Click on the Automation in the list to open it.
You are now ready to edit the schedule!
b) Edit the Trigger
Double click the Schedule Trigger,then update Minutes to Days in the Repeat every section.
Fill in a start date of tomorrow at 1:00 AM.(select the date on the calendar widget and manually edit the time that populates.)
Apply the changes,then Start Automation.
c) Manually Trigger the Automation
To test the Automation without waiting for the next scheduled run time,
Double-click the Schedule Trigger while the Automation is running.
There will be a green Trigger button at the bottom of the (locked) configuration panel.Click it to initiate the Automation.
To verify that your Automation worked,check the logs via one of the methods above.
Congratulations!We've now set up FME Server to perform a scheduled task once a day.You can confirm the schedule is in place by looking at the Start Time column in your Schedules page;it should show the workspace will run tomorrow at 1:00 am.
If desired,an Automation can send notifications on success and/or failure of a task.To do this,we would attach External Actions to the output ports of the 亚搏国际在线官网CommunityMapping workspace Action.For now,we'll omit these.If you would like to learn more about FME Server Automations,please consider the tutorialGetting Started with Automations.
We hope you have found these Getting Started with FME Server tutorials useful.If you have any questions about using FME Server,check out theQ&A Forum,read theFME Server Documentation,or post your question in the comments below.If you want more tutorials to try out other features of FME Server,check out theQuickstart(also accessible from the web user interface login page).You can also view a recorded training course or sign up for a live online training on ourtraining page.Thanks!
Tutorial: Getting Started with FME Server
Publish a Workspace to FME Server and Run It
Create Self-Serve Access to Data with FME Server
Job Orchestration with Automations
Creating a "Visual Calendar of Schedules" as an FME Server Dashboard
Getting Started with Automations
FME Server Troubleshooting Guide: Initial Troubleshooting
FME Server Fails to Fully Start on Linux When Configured to Use Oracle Database
© 2019 亚搏在线Safe Software Inc |Legal