I have a series of workspaces that are part of a web application and are called asynchronously via the REST services with an opt_requesteremail provided.
In the workspaces I create specific messages using attribute information and format them with a variant of the FMEServerEmailGenerator. I then have a text writer registered with the data to post on a success topic.
Note that if used the FMEServerNotifer instead of writing out the text file, and have no success topic published, then I end up with two emails, one custom email from the FMEServerNotifier, and the generic JOBSUBMITTER_ASYNC_JOB_SUCCESS.
However, when it comes to failures, I run into a problem. In most cases I am forcing the failure via a terminator. I can generate the emails and use the notifier prior to a terminator. But then I end up with two emails, custom and generic JOBSUBMITTER_ASYNC_JOB_FAILURE.
I can try to write out the failure message to the text writer and post to a a failure topic, with a branch to a terminator. But I can't guarantee that the text gets written prior to the terminator being triggered.
I tried using an in-stream writer (AttributeFileWriter b/c Server 2015) prior to the terminator, but that file is not picked up as the data to post.
What other possibilities are there?