Skip to main content
Question

Send email if workspace fails


Hi,

 

I am trying to work out the best way to send an email if a workbench fails. I have searched through the forum and found someone asking something similar, and they seemed to achieve this by using WorkspaceRunner and Emailer: Send email if translation fail (safe.com).

 

However I can't seem to get this working. I know my emailer settings are right, as I just tried it within a different workbench and got the email notifications, so I think the problem is with WorkspaceRunner.

 

It is the first time I have used this. Initially I tried creating a new workspace, adding WorkpaceRunner, configuring it to look at my main workbench, then attached the succeeded and failed outputs to Emailer. So all I had in the workbench was the WorkspaceRunner and Emailer. But when I then go and run the main workbench, I don't get any emails. Does the WorkspaceRunner dynamically read the other workbench, so when that's run this should also run?

I then tried adding in my main workbench as a reader (as a single merged feature) and used that as the input for WorkspaceRunner. When running it took a long time to process, and the number of features being written to the emailer was more than 1 (I only expected one, as workbench would only run once and either fail or succeed?). This did however start sending me emails, but it was sending me several emails. I think this was due to reading in all the feature types from the workbench?

Do I need to only bring in a certain feature type when reading in the workbench, and connect that to the WorkspaceRunner input?

3 replies

hkingsbury
Celebrity
Forum|alt.badge.img+53
  • Celebrity
  • June 16, 2021

You are able to trigger the workspace runner with any feature. In your case, using a creator would suffice. Make sure your workspace runner is set to "Wait for Job to Complete: Yes". It defaults to "No". With it set to "Yes" the parent/master workspace will stay 'running' until the child is complete in which case it will report either a success or failure


  • Author
  • June 17, 2021
hkingsbury wrote:

You are able to trigger the workspace runner with any feature. In your case, using a creator would suffice. Make sure your workspace runner is set to "Wait for Job to Complete: Yes". It defaults to "No". With it set to "Yes" the parent/master workspace will stay 'running' until the child is complete in which case it will report either a success or failure

Thanks for that.

I have WorkspaceRunner setup to 'wait for job to complete' already, so that shouldn't be an issue.

You mention using a creator to trigger the workspace... does this need to be configured in such a way, or just add a creator and link to the WorkspaceRunner? I have attached a screenshot of my workbench.

If I run this workbench it does send me an email. Am I right in thinking that I wont have to run this workbench though, it should get triggered once the parent/master workbench is ran (currently setup to run daily on a schedule)? FME_1


  • August 3, 2021
dan_mbc wrote:

Thanks for that.

I have WorkspaceRunner setup to 'wait for job to complete' already, so that shouldn't be an issue.

You mention using a creator to trigger the workspace... does this need to be configured in such a way, or just add a creator and link to the WorkspaceRunner? I have attached a screenshot of my workbench.

If I run this workbench it does send me an email. Am I right in thinking that I wont have to run this workbench though, it should get triggered once the parent/master workbench is ran (currently setup to run daily on a schedule)? FME_1

When you run this workbench, it will trigger your parent/master workbench to run. I just built one of these today.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings