Skip to main content
Solved

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

  • March 6, 2018
  • 1 reply
  • 8 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!

View original
Did this help you find an answer to your question?

1 reply

  • Author
  • 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!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings