Question

How to get job failure email if workspace fired from subscription fails

  • 9 November 2016
  • 8 replies
  • 11 views

Badge +8

I have a directory watch publication which notifies a topic which in turn notifies a subscription which runs a workspace. From a user standpoint, the workspace runs when a file is dropped into the directory being watched. I would like FME Server to notify me when the workspace fails in any way, not just under a specific condition(s). I can force the workspace to fail (by dropping the wrong file type in the directory) and can see it failed in the list of jobs. Can I utilize that somehow? Or should I use Notification Message Mapping in the subscription settings? The help for Notification Message Mapping is vague to me; I don't understand the specifics. Anyway, if someone could suggest a solution to email me when the workspace fails I would appreciate it. (FME Server 2016.1.0.1 Build 16494, Win32)


8 replies

Badge +16

Hi @aaron FME Server comes with default subscription for this scenario see for more info.

https://knowledge.safe.com/articles/30539/workspace-notifications-part-2-configuring-the-def-4.html

Badge +8

Itay, I'm aware of those subscriptions, and have used them, but they aren't applicable in this case. I have a subscription running a workspace; I want to generate success or fail emails from that. I can't do a subscription (email protocol) of a subscription (workspace protocol). I want to generate a success or fail email when the workspace fired by that subscription completes.

Badge +16

I dont see why you cannot set the ws running via a subscription to notify another topic to which the failure email subscription is tyed to, but maybe I misunderstood you.

Badge +8

How does a subscription notify a topic? They subscribe to topics but I don't see how to notify from one. If you could explain how, I'm certainly willing to try! :)

Badge +16

How does a subscription notify a topic? They subscribe to topics but I don't see how to notify from one. If you could explain how, I'm certainly willing to try! :)

Let me see if I get your situation first.

 

you have a ws triggered by a subscription on fme server, right?

 

when you upload the workspace to fme server you can select a topic to notify on failure in the job submitter service properties.

 

so the fact that the workspace is triggered by another subscription doesn't really matter.

 

if this is not the case, could you elaborate why this won't work?

 

Badge +8

Itay, in response to your comment:

When I uploaded the workspace I did in fact select to email on both success and failure. They work (for instance, if I trigger a one-time run from the web interface). The catch is it is a job submitter service that notifies the email topics. In my case, however, it is a notification service that fires off my workspace, not a job submitter service. In sum, the issue is that I can't see how to notify the email topics from the subscription.

Badge +8

Got an answer working with Safe via chat. It was a simple fix. Subscribe to the Notification service when publishing the workspace to FME Server! I had only subscribed to the Job Submitter service. Some additional details: When publishing to FME Server from Desktop, I subscribed to my directory watch topic in the notification service and was also able to post to success and fail email topics. After clicking the Publish button, a subscription with a push protocol was created that runs the workspace (via a target URL) and posts to both success and fail email topics. (I had previously created a subscription with workspace protocol via the web browser; the workspace protocol it does not have the ability to post to success or failure topics.)

I think this is what Itay was getting at above but I didn't understand so I will credit accordingly.

Badge +16

Itay, in response to your comment:

When I uploaded the workspace I did in fact select to email on both success and failure. They work (for instance, if I trigger a one-time run from the web interface). The catch is it is a job submitter service that notifies the email topics. In my case, however, it is a notification service that fires off my workspace, not a job submitter service. In sum, the issue is that I can't see how to notify the email topics from the subscription.

Ok I understand the confusion! I always leave the jobsubmitter service on when uploading a ws, this way I can always see the details via the webui.

 

there is a reason why it's always on by default.

Reply