Skip to main content

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.
 



 

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


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.


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

 

 


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


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.


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'))

 


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?