Question

How to collect retrieved logs for FMEServerEmailGenerator


Badge

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?


4 replies

Userlevel 4

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.

Badge

@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.

Badge +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.

Userlevel 4

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.

Reply