Question

Exposing web connection details in workspace


Badge +11

I'm using a web connection to an FME Server instance to call an FMEServerJobSubmitter. I would like to trigger a topic to notify an external application that the job was submitted and I would like to include the FME Server hostname in my notification. The FME Server instance that the job was submitted to is not necessarily the same as the instance that the calling job is running on, so I can't rely on the built-in FME Server Parameters.

Is there any way that the hostname can be somehow extracted from an FME web connection? Happy to resort to Python or other methods if necessary. I'd like this to be a dynamic solution rather than manually defining the hostname somewhere in my workspace.


3 replies

Badge +9

Hi @nic_ran

It doesn't look like there is an easy way to get at that information right now. This might be a good candidate for the Ideas page here to perhaps update the FMEServerJobSubmitter to return an attribute with the hostname of the server that the job was submitted to.

For now though, this information like this is output to the Log file when a job is submitted:

FMEServerJobSubmitter(ServerFactory): http://serverhost - Job #4615 submitted

So, one option might be to use a PythonCaller to open the logfile and look for the line containing the job ID of the job just submitted and then pull out the hostname from that.

Badge +11

Hi @nic_ran

It doesn't look like there is an easy way to get at that information right now. This might be a good candidate for the Ideas page here to perhaps update the FMEServerJobSubmitter to return an attribute with the hostname of the server that the job was submitted to.

For now though, this information like this is output to the Log file when a job is submitted:

FMEServerJobSubmitter(ServerFactory): http://serverhost - Job #4615 submitted

So, one option might be to use a PythonCaller to open the logfile and look for the line containing the job ID of the job just submitted and then pull out the hostname from that.

Thanks Laura, I'll submit an Idea for the hostname to be included in the FMEServerJobSubmitter response. Sounds like a reasonable enhancement and should meet my requirements.

 

For now I'll look into extracting the info from the log file.

 

 

Badge +11

Hi @nic_ran

It doesn't look like there is an easy way to get at that information right now. This might be a good candidate for the Ideas page here to perhaps update the FMEServerJobSubmitter to return an attribute with the hostname of the server that the job was submitted to.

For now though, this information like this is output to the Log file when a job is submitted:

FMEServerJobSubmitter(ServerFactory): http://serverhost - Job #4615 submitted

So, one option might be to use a PythonCaller to open the logfile and look for the line containing the job ID of the job just submitted and then pull out the hostname from that.

Link to related idea:

 

https://knowledge.safe.com/idea/73963/expose-fme-server-host-name-in-fmeserverjobsubmitt.html

 

 

Reply