斯潘8
span4
FME Server allows you to build up complex 亚搏在线workflows by linking individual workspaces together,and taking a variety of actions depending on whether the workspaces complete successfully.Like most FME tasks,亚搏在线workflow management is best done using a workspace built in FME Workbench.
If you are using FME Server 2017.1,请参阅:FME服务器工作流管理亚搏在线
If you are using FME Server 2014,请参阅:FME Server 亚搏在线Workflow Management (FME Server 2014)
TheFMEServerJobSubmitter(FMEServerJobSubmitter)is the key transformer for managing FME Server 亚搏在线workflows.Beginning with FME Server 2014,对fmeserverjobsubmitter的工作方式进行了更改。在等待作业完成时,可以使用控制器工作区来运行作业,without tying up another FME Engine on the server.This tutorial requires only one FME Engine.本教程中描述的方法替换了我们先前推荐的几个更复杂的方法。
亚搏在线工作流管理示例-多个引擎:
在这个例子中,我们将使用将矢量数据从一个shapefile加载到数据库的示例,处理数据,and creating raster web map tiles.这是通过使用4工作空间- one controller and three workers.The controller runs each workspace in turn,and FME Server could be configured to send an email upon successful completion of the entire process.这只需要one FME Engine.
Typically,您将构建组成工作流程的各个工作区。亚搏在线For this tutorial,我们已经构建了如上所述的工作区。For details on how they work,在FME工作台中打开*.fmw文件并阅读注释。
a)将所有流程工作区(如下所列)发布到FME服务器上的新存储库中。Note that you will not need to upload any data along with the workspaces.
b)测试工作空间,确保它们单独工作(即手动向下一个工作区提供输入数据)。这可以使用作业提交者服务的配置对话框或使用FME工作台来完成。
Make sure to use the appropriate input data sources as listed below:
Once the individual component workspaces are published,您可以开始设置控制器工作区(链轮)For this tutorial,a controller is already built.然而,you will need to go through the wizard for each FMEServerJobSubmitter to configure it properly for your FME Server installation (update the FMEServerJobSubmitters with your hostname and credentials),并为发布的参数选择正确的值。Please note that the worker workspaces should already be published at this point.
工作流是亚搏在线由创建者启动的。The FMEServerJobSubmitters are configured as follows:
Thefirstfmeserverjobsubmitter需要在控制器工作区的已发布参数中设置的输入文件:终止符用于异常处理,并将记录哪个工作区导致失败。They will also cause the controller workspace to report failure,而不是报告错误的成功。
当输出到基于文件的数据格式(如我们使用的是空间网站数据库)时,您可以在工作区之间传递对该文件的引用,使用output_datasets{}list.For each output dataset,there are three attributes:name,path,andformat.只有在选择“输出数据位置:临时文件夹”时才会发生这种情况。
要访问这些属性,you can explode the list to have one feature per dataset using the列表爆炸器,or simply reference the first dataset as output_dataset{0}.
在第二fmeserverjobsubmitter,提交者,我们将使用Path属性传递对文件的引用:
如果你要用DBMS,you would instead specify the connection parameters as published parameters of the controller workspace.
在最后的fmeserverjobsubmitter,提交者,我们要将输出(web map tiles)写入到作业完成后可以访问的位置,
In FME 2015 a new feature,称为“输出数据位置”,已添加到FMEServerJobSubmitter变压器。This enables a user to send the output data to their own output location (such as a UNC path or shared resource) instead of using a temporary location on the server.要做到这一点,select the option 'As Specified in Workspace' in the transformer properties.在这种情况下,我们提供了fme_sharedesource_temp参数:
我们现在准备发布控制器工作区。It can be published to the Job Submitter service.
When running the controller workspace,提供正确的形状文件。If you upload the supplied zip files as input,make sure to actually select the *.shp file inside the zipped directory:
注释: only one job will show up in FME Server's Job History.然而,its log file will contain the full logging information from all three workspaces.
此示例演示如何使用控制器工作区并行运行多个作业FME发动机.用这种方法,you can run a series of jobs and perform downstream processing from within a single workspace.
工作空间(工作空间)并联发动机.fmw)使用提交四个作业进行处理FMEServerJobSubmitter(FMEServerJobSubmitter)变压器。They are submitted at exactly the same time and are run on multiple engines (if available).工作区使用FMEServerJobWaiter然后在所有处理完成后发送电子邮件。
警告:如果此工作流使用不当,则可能导致FME服务器死锁。亚搏在线For example,如果你有三个引擎,运行控制器工作区三次,将有3个作业被卡住,等待排队的作业完成。因为所有的引擎都被占用了,the controller jobs will never complete,需要手动取消。
并行运行作业的关键是设置FMEServerJobSubmitter的“等待服务器作业完成”参数到'No'.此设置使变压器无阻塞,从而可以提交多个作业。
Each feature output from aFMEServerJobSubmitter(FMEServerJobSubmitter)transformer contains the job_id.This id can be used by theFMEServerJobWaiter检查工作是否完成。Once all jobs have been completed,这些功能将退出FMEServerJobWaiter从而可以进行进一步的处理。
注:在附加的工作区中有一个FMEServerJobSubmitter(FMEServerJobSubmitter)参数设置为“等待服务器作业完成”是的。这样做是为了演示,以显示您可以在工作区中具有多个具有不同设置的变压器。
In order to be notified of problems with the 亚搏在线workflow,可以设置控制器工作区以在失败时发布到主题,并添加电子邮件订阅。请参阅我们的教程系列email in FME Serverfor more information - specifically,sending an email when a workspace completes.
You can also automate the initiation of the workspace by using the Notification service - perhaps to watch a directory for changes,or to respond to an incoming email attachment.这种方式,FME Server can automatically load new data into your database,处理它,创建Web地图图块并将其上载到宿主位置,比如亚马逊S3。
© 2019 亚搏在线Safe Software Inc |合法的