Solved

Topic on cancel

  • 15 August 2018
  • 2 replies
  • 7 views

Badge +2

Hi all,

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

 

icon

Best answer by hollyatsafe 15 August 2018, 19:05

View original

2 replies

Badge +2

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.

You can find more details about the FME Server Rest API here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/transformations/result_get_18

Badge +2

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.

You can find more details about the FME Server Rest API here: https://docs.safe.com/fme/html/FME_REST/apidoc/v3/index.html#!/transformations/result_get_18

Thank you for your reply.

 

I posted the idea.

 

https://knowledge.safe.com/idea/76535/topic-on-cancel-1.html?

 

 

Reply