Skip to main content

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?

@jdh

I'm wondering why you even have your subscriptions subscribe to JOBSUBMITTER_ASYNC_JOB_SUCCESS and JOBSUBMITTER_ASYNC_JOB_FAILURE? Do they need to?

Why not have two topics - call them, say, JobSuccess and JobFailure. When you publish the workspace you tell it to trigger JobSuccess when the job is successful, and use the TextFile writer for the content. Then use a Notifier transformer in the workspace to trigger JobFailure before going on to the Terminator

You also create one email-based Subscription that is connected to JobSuccess (and uses the Writer content) and another that is connected to JobFailure (and is probably a fixed message).

But your email subscriptions should not also listen to the ASYNC_JOB topics or else, yes, they will be triggered twice. You should use your own topics, or these predefined ones, but not both - preferably your own topics because all workspaces will trigger the predefined ones, not just yours.

Does that help?

Mark


@Mark2AtSafe, my subscriptions have their own topics completely independent of JOBSUBMITTER_ASYNC_JOB_SUCESS|FAILURE.

 

 

However, if I leave the topic to subscribe to blank (using instead the FMEServerNotifier), the JOBSUBMITTER_ASYNC_JOB... still get's triggered, and I end up with two emails.

@Mark2AtSafe, my subscriptions have their own topics completely independent of JOBSUBMITTER_ASYNC_JOB_SUCESS|FAILURE.

 

 

However, if I leave the topic to subscribe to blank (using instead the FMEServerNotifier), the JOBSUBMITTER_ASYNC_JOB... still get's triggered, and I end up with two emails.

Right, but you must have an email subscriber connected to the ASYNC topic, else you wouldn't get an email because of it. I get some defined by default, for example DataDownload_Email_JobFailure, but I don't get an email because it's set up to email recipient@example.com by default. So perhaps you are getting one of these default emails (somehow it has your proper email address) and can just delete those subscriptions, or you could just delete the ASYNC topics if you don't need them.


Reply