You could do something like the following:
- Create a new topic like "WORKSPACE_FAILURE_RESUBMIT"
- When starting all the server jobs, make sure they're configured to notifiy this topic if they fail.
- 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:
- Create a new topic like "WORKSPACE_FAILURE_RESUBMIT"
- When starting all the server jobs, make sure they're configured to notifiy this topic if they fail.
- 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