Skip to main content

Hi community,

We run into the problems that certain jobs on FME Server fail become the underlying database can not be reached (temporarily). We are looking into the causes of this. In the meantime I am looking for a way to automatically resubmit the failed jobs after a certain time, e.g. retry after 30 minutes and perhaps retry a couple of times, rather than having to manually resubmit the failed jobs by the FME Server administrator.

Is there a way to do this?

Thanks,

Joep Luijten

 

You could do something like the following:

  1. Create a new topic like "WORKSPACE_FAILURE_RESUBMIT"
  2. When starting all the server jobs, make sure they're configured to notifiy this topic if they fail.
  3. Create a Workspace subscription on this topic that triggers a new workspace, e.g. ResubmitJob.fmw

The workspace ResubmitJob.fmw could go something like this:

  • Read the timestamp for last startup in a small json file or text file
  • Use the FME Server rest API to get all the failed jobs since the last startup time
  • For each failed job, request detailed job information which will contain information about published parameters
  • Use the FME Server REST API to resubmit the job with the same parameter values
  • Save the timestamp with the startup of this workspace to your json or text file referenced in the first point above

Sounds like something that could make for a very nice addition to FME Hub!

API call to get a list of all the failed jobs:

/fmerest/v3/transformations/jobs/completed?completedState=failed

API call to get the job details, including published parameters, for job ID 123:

/fmerest/v3/transformations/jobs/id/123/request

 


You could do something like the following:

  1. Create a new topic like "WORKSPACE_FAILURE_RESUBMIT"
  2. When starting all the server jobs, make sure they're configured to notifiy this topic if they fail.
  3. Create a Workspace subscription on this topic that triggers a new workspace, e.g. ResubmitJob.fmw

The workspace ResubmitJob.fmw could go something like this:

  • Read the timestamp for last startup in a small json file or text file
  • Use the FME Server rest API to get all the failed jobs since the last startup time
  • For each failed job, request detailed job information which will contain information about published parameters
  • Use the FME Server REST API to resubmit the job with the same parameter values
  • Save the timestamp with the startup of this workspace to your json or text file referenced in the first point above

Sounds like something that could make for a very nice addition to FME Hub!

API call to get a list of all the failed jobs:

/fmerest/v3/transformations/jobs/completed?completedState=failed

API call to get the job details, including published parameters, for job ID 123:

/fmerest/v3/transformations/jobs/id/123/request

 

Hello David,

Thank you for the suggestion.

I fallowed all the above steps and able to rerun the failed jobs through failure topic, here my workflow is the parent job(workbench) triggers multiple child jobs(Workbench) simultaneously and i configured this failure topic to child workbench.

When i ran child workbench only it triggers the failure topic and it is not triggered the failed topic when the job runs via parent workbench to child workbench.

Is there any option?

 

Thanks

Upendra.


Hello David,

Thank you for the suggestion.

I fallowed all the above steps and able to rerun the failed jobs through failure topic, here my workflow is the parent job(workbench) triggers multiple child jobs(Workbench) simultaneously and i configured this failure topic to child workbench.

When i ran child workbench only it triggers the failure topic and it is not triggered the failed topic when the job runs via parent workbench to child workbench.

Is there any option?

 

Thanks

Upendra.

I'm not sure I understand. Do you mean that the re-submitted workspace doesn't get restarted if it failes a second time?


I'm not sure I understand. Do you mean that the re-submitted workspace doesn't get restarted if it failes a second time?

Hello David,

I tried to submit a job using HTTP caller POST method, while assigning dynamic values to published parameters in upload body transformer failed to submit the job and return the fallowing error "{"message":"Invalid JSON. Reason: Missing value at 65 [character 11 line 4]"}".

 

In upload body i given the json like below.

{

"publishedParameters": {

"name": "standard",

"value": @Value(Path)

}, {

"name": "Input",

"value": @Value(InputParameter)

}]

}

 

Any Suggestions?


Hello David,

I tried to submit a job using HTTP caller POST method, while assigning dynamic values to published parameters in upload body transformer failed to submit the job and return the fallowing error "{"message":"Invalid JSON. Reason: Missing value at 65 Jcharacter 11 line 4]"}".

 

In upload body i given the json like below.

{

"publishedParameters": Â{

"name": "standard",

"value": @Value(Path)

}, {

"name": "Input",

"value": @Value(InputParameter)

}]

}

 

Any Suggestions? 

Try putting double quotes around your value strings, e.g.

"value": "@Value(InputParameter)"

Alternatively I'd recommend using the JSONTemplater, it does a lot of the heavy lifting for you.


Try putting double quotes around your value strings, e.g.

"value": "@Value(InputParameter)"

Alternatively I'd recommend using the JSONTemplater, it does a lot of the heavy lifting for you.

Thank you, it's working


Reply