Skip to main content
Solved

Saving FME Server Topic as an attribute value (FME Server)

  • March 6, 2018
  • 1 reply
  • 13 views

Hello,

I have several publications in FME Server that are monitoring for incoming emails. The publications are subscribed to different topics. I am making a master log (in SQL) of all incoming emails for all the topics.

When I start the monitor for a topic in FME Server, I get this sample JSON notification output:

{ "email_publisher_subject": "[this is the subject]", "email_publisher_sent": "Fri Jun 30 14:41:19 EDT 2017", "email_publisher_content_type{1}": "text/html; charset=\\"iso-8859-1\\"", "email_publisher_from": "testemail@gmail.ca", "email_publisher_content_type{0}": "text/plain; charset=\\"iso-8859-1\\"", "ws_topic": "Document_Incoming (EMAIL)", "email_publisher_received": "Fri Jun 30 14:41:32 EDT 2017", "email_publisher_to": "destination_email@gmail.ca", "email_publisher_content{0}": "[email content goes here]", "fns_type": "email_publisher" }

I want to capture "ws_topic" as an attribute. If I save this notification to a text of JSON file and run it via a FME script by using a JSON reader, the ws_topic is saved in the database with the value "Document_Incoming (EMAIL)". But when I upload the same script to FME Server and map the source to the Notification Message, ws_topic comes up NULL. All other parameters are logging fine.

I don't understand what I am doing wrong here. Any help will be appreciated.

Best answer by fariyafarhad

I managed to find my own solution!

There are an FME Server Parameter called FME_TOPIC. I created an attribute having the value of that parameter and output that in the log. Works perfectly!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

  • Author
  • 62 replies
  • Best Answer
  • March 6, 2018

I managed to find my own solution!

There are an FME Server Parameter called FME_TOPIC. I created an attribute having the value of that parameter and output that in the log. Works perfectly!