Is there a way to trigger a topic if a job is cancelled or just send a email?
I have a script running in on a schedule with a Running Job Expiry Time.
Sometimes my job exceeds this time and is cancelled, but that does not result in a failure (or success).
Thanks in advance
Best answer by hollyatsafe
Hi @meijer,
I can't see a simple way to do this at the moment, it might be worth posting an idea here: https://knowledge.safe.com/content/idea/post.html to add a 'Post to Topics if cancelled' option when publishing a workspace to FME Server.
In the meantime you may be able to set this up if you use an FMEServerJobSubmitter to trigger the job to run and then use the job ID from the submitted port to connect to the FMEServer Rest API and fetch the status of this job. Test for status = ABORTED and if passed this will go to an emailer transformer where you can then be notified. You will probably also need to set up a loop to keep checking if the status is submitted, queued or pulled as this could still lead to a cancellation.
I can't see a simple way to do this at the moment, it might be worth posting an idea here: https://knowledge.safe.com/content/idea/post.html to add a 'Post to Topics if cancelled' option when publishing a workspace to FME Server.
In the meantime you may be able to set this up if you use an FMEServerJobSubmitter to trigger the job to run and then use the job ID from the submitted port to connect to the FMEServer Rest API and fetch the status of this job. Test for status = ABORTED and if passed this will go to an emailer transformer where you can then be notified. You will probably also need to set up a loop to keep checking if the status is submitted, queued or pulled as this could still lead to a cancellation.
I can't see a simple way to do this at the moment, it might be worth posting an idea here: https://knowledge.safe.com/content/idea/post.html to add a 'Post to Topics if cancelled' option when publishing a workspace to FME Server.
In the meantime you may be able to set this up if you use an FMEServerJobSubmitter to trigger the job to run and then use the job ID from the submitted port to connect to the FMEServer Rest API and fetch the status of this job. Test for status = ABORTED and if passed this will go to an emailer transformer where you can then be notified. You will probably also need to set up a loop to keep checking if the status is submitted, queued or pulled as this could still lead to a cancellation.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.