span8
span4
span8
span4
Notification Workspace Templates
For articles that support previous releases of FME Server please see:
The recommended method for sending a notification while a workspace is running is theFMEServerNotifier.This transformer allows you to select a topic,and specify a message.The message can be generated on the fly from feature attributes,workspace parameters,or system parameters.This method works in FME Desktop and on FME Server.
In this example,we will be generating notification content dynamically,formatting it for use by the email subscriber,and notifying FME Server from within a workspace.The actual work done is a simple conversion from MapInfo TAB to File Geodatabase.
Please follow these steps:
1)Use an existing workspace,or use the sample provided (demoNotify-Begin.fmwt).A completed workspace has also been provided in the zip file (demoNotify-Complete.fmwt).
2)Branch off from the main 亚搏在线workflow at the point where you'd like to send a notification.Add an Aggregator transformer and connect it to the second stream of data coming from the bikeways feature class.Configure it as follows:
3)Add a TimeStamper.
4)Add an AttributeCreator.Create the following attributes,with the values specified.For the full list of keywords,see theemail subscriber documentation.
email_subject: FME Notification: $(FME_MF_DIR)
email_to:user@example.com
email_from:fme@example.com
subscriber_content通知:在@ value (_timestamp)生成的。@Value(_count) features were read.
5)Use a JSONTemplater to build up the notification.The JSONTemplater uses XQuery to format the template,and the syntax is attached below:
{ "email_from" : fme:get-attribute("email_from"),"email_to" : fme:get-attribute("email_to"),"email_subject" : fme:get-attribute("email_subject"),"subscriber_content" : fme:get-attribute("subscriber_content")}
6)Add an FMEServerNotifier,and configure as follows:
Here is the completed workspace:
7)Run the workspace.When it is run,it will publish toSAMPLE_TOPIC.You can see the result using Topic Monitoring on the Notification page in the FME Server Web Interface.
Receiving email,Part 1: Setting up a topic and an email address (2015)
Sending email,Part 1: Setting up a topic and an email subscriber (2015)
Workspace notifications,Part 3: Completion notification (2015)
Sending email,Part 5: Sending an email with attachments (2015)
Sending email,Part 2: Sending an email using the FMEServerNotifier (2015)
Sending email,Part 4: Sending prettier email using HTML (2015)
Receiving email,Part 2: Processing email with a workspace (2015)
Receiving email,Part 3: Using email attachments (2015)
Sending email,Part 3: Sending an email when a workspace completes (2015)
Workspace Notifications,Part 1: From within the workspace (2015)
© 2019 亚搏在线Safe Software Inc |Legal