Skip to main content
Question

How to collect retrieved logs for FMEServerEmailGenerator

  • May 9, 2018
  • 4 replies
  • 25 views

dollargis
Contributor
Forum|alt.badge.img+6

In my workspace I have a FMEServerJobSubmitter, that submits several tables for processing, and a FMEServerLogFileRetriever that collects the log to be sent through a FMEServerEmailGenerator

(the PythonCaller just condenses the log content)

My problem is that just the last logfile gets sent, obviously because the log_attribute, in which the retriever copies the content, gets emptied at that stage.

How can I collect all log messages to get them sent together when the workspace finishes its work?

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.

4 replies

david_r
Celebrity
  • 8394 replies
  • May 9, 2018

The issue is that you're generating the same email content several times, one time for each job id. The FMEServerEmailGenerator isn't supposed to be called more than once.

The easiest workaround is probably to use the Emailer rather than the FMEServerEmailGenerator.


dollargis
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 37 replies
  • May 9, 2018

@david_r: I tried this and it works indeed but has drawbacks:

* I have to deal with smtp-credentials in a workspace, which I would prefer to leave on the server side

* the Emailer-sent mails won't get displayed nicely by Outlook, it doesn't honor the standard linebreaks but muddles everything into a long string

* I will recieve a multitude of emails instead one consolidated mail which would inform me about the sum of the submitted jobs

Therefore I would be more than glad if I could collect the messages into one before submitting it to the Generator.


Forum|alt.badge.img+2

Hi @dollargis

What about using an aggregator before the EmailGenerator transformer? You should be able to play with the setting in there to add all the logs one after another.


david_r
Celebrity
  • 8394 replies
  • May 9, 2018

In that case I would look into using something like the Aggregator to assemble all the incoming features into a single one feature for the FMEServerEmailGenerator. Perhaps also do some pre-processing in Python, if necessary.