Skip to main content
Solved

How to verify if all the workbenches in an automation for a particular run/trigger are successful?

  • February 27, 2025
  • 7 replies
  • 55 views

iamprem
Contributor
Forum|alt.badge.img+2

Problem Statement:

I need to verify if all the workbenches in an automation for a particular run/trigger are successful. There can be multiple runs/triggers in a day, and the number of triggers per day is unknown.

 

Things I Have Tried:

When I attempt to retrieve relevant data from the FME Flow PostgreSQL database, I can't find a unique identifier for each run/trigger of an automation.

I can see an event_id in web interface, but unable to find that in the postgres database.
 



 

Best answer by ebygomm

I think that’s saying you can’t return statistics about an automation via the web api.

 

You can make a call to return all jobs triggered by an automation

fmerest/v3/transformations/jobs/completed?limit=-1&offset=-1&sourceID=<AuomationID>&sourceType=Automations

 

I’ve used it to look at how many jobs are triggered from an automation

 

 

View original
Did this help you find an answer to your question?

7 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • February 27, 2025

You can query jobs triggered by a particular automation via rest api, this gives you the event id.


iamprem
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 27, 2025

Thank you for your response, ​@ebygomm . I'll give that a shot. However, I came across an article (https://support.safe.com/hc/en-us/articles/25407532206989-Monitoring-FME-Server-Job-Activity-using-the-REST-API) which mentions, 'Currently, the REST API does not support retrieving job history for each individual automation.'
 


It would be great if you could share any examples if you have them handy.
 

That would be very helpful.
 

Thanks.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • Best Answer
  • February 28, 2025

I think that’s saying you can’t return statistics about an automation via the web api.

 

You can make a call to return all jobs triggered by an automation

fmerest/v3/transformations/jobs/completed?limit=-1&offset=-1&sourceID=<AuomationID>&sourceType=Automations

 

I’ve used it to look at how many jobs are triggered from an automation

 

 


iamprem
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • February 28, 2025

Thanks for sharing an example, this really helps. ​@ebygomm


iamprem
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 12, 2025

Hi ​@ebygomm ,

I want to extract a few published parameters for a workbench into a attribute, I used a similar xquery to do it, but it was not successful.

XQuery I used:

for $m in json:members(fme:get-json-attribute('publishedParameters'))
where $m('name') = "substationName" or $m('name') = "subnetworkName"
return fme:set-attribute($m('name'), $m('raw'))

How do I do this in a correct way? Suggestions?

That would be very helpful.
 

Thanks.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • March 12, 2025

Have you extracted the parameters, my workspace does something like this

then this in the xquery

for $m in jn:members(fme:get-json-attribute('parameters'))
return fme:set-attribute($m('name'), $m('raw')) 

 


iamprem
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • March 14, 2025

Thanks ​@ebygomm !

As part of this thread, I just want to ask another question related to this:

Is there a way to get all the logs for workbenches in a automation as a attribute?


Reply


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