SPAN8.
SPAN4.
FME Workbench可用于构建一个工作空间,该工作空间将检查数据集或服务,了解所需结果,更改符合某些标准的更改值或值。然后可以在计划中定期在FME服务器上运行这些。
如果返回数据,则识别或标准符合工作空间可以触发事件(订阅)。这可以是数据处理或发送通知。
在本教程中,我们将使用OpenWeatherMapforcaster来检查天气并向FME服务器发送通知,请访问当前条件。
Weatherupdates-begin.fmw
Weatherupdates-Complete.fmw.
请下载OpenWeathermap.Forecaster transformer来自FME枢纽。您需要注册API密钥OpenWeathermap.。
该变形器采用点几何来返回天气预报,因此您需要在FME中创建一个兴趣点(您想要的天气预报)。
Some useful coordinates may be:
会议中心(FME UC地点):LAT:49.2892260,LON:-123.1169553
亚搏在线安全软件办公室:拉特:49.138036 LON:-122.857629
You can also find your own lat/lon coordinates using Google Maps.
Enter the coordinates into the Creator by putting the lon value in the ‘X Value’ and the lat value into the ‘Y Value’. To do this you will need to click on the [...] next to the ‘Geometry Object: Point’.
运行工作区并检查输出。
在OpenWeatherMapforEcaster中,将天气设置为“当前”并进入API键。
现在我们想创建一个通知消息。添加attributecreator并使用OpenWeatherMapforeCaster的输出构建您的邮件。
For example:
新属性:天气消息
属性值:现在天气是@Value(Weather_description)。云覆盖是@Value(云)%。
我们需要某处发送此消息,因此我们将发送到FME服务器上的主题。为FME服务器打开Web UI,然后转到通知>主题。添加一个名为weather_alert的新主题。您还应该看到主题监视的选项。选择Weather_alert主题,然后按播放按钮开始监控。不要关闭此选项卡,我们将在运行天气工作空间后重新回复此处。
返回工作台,添加FMEServerNotifier并打开参数。添加到FME服务器的连接,选择Weather_Alert主题,并为内容选择您的天气消息属性。
运行工作区。完成后,请在浏览器中打开通知页面。您应该在主题监视下查看您的邮件。
作为一个伸展,您是否可以调整工作区以检查未来的天气预报并根据不同的天气事件通知吗?
提示:查看WeatherUpdates-Complete.fmw
在监视Weather_Alert主题时,您应该看到attributecreator中构建的消息在FME服务器中显示为主题消息。
你可以创建一个触发的订阅经过this topic that can alert someone about upcoming weather conditions, such as sending an email or SMS.
©2020 S亚搏在线afe Software Inc |Legal