Skip to main content
Hi,

 

    My workbench is published in FMEServer. At the end of workbench execution, i have to log the generated LOG file and FFS file complete path in database . I thought of doing it in shutdown script. But i do not know how to get their location.

 

 

Any pointers will be highly helpful.

 

 

Thanks.

 

Subrat
Hi,

 

 

starting with FME 2014, you can get the FME log file location in a shutdown script like this:

 

 

---

 

import fme

 

log_file_name = fme.logFileName

 

---

 

 

For your FFS file, it is not so simple, but I guess that you can publish the FFS filename as a parameter and then access it the usual way through the FME_MacroValues dictionary, e.g.

 

 

ffs_file_name = FME_MacroValuesM'MY_FFS_FILENAME_PARAMETER']

 

 

David
Thanks David for the solution. Unfortunately, my project has licenced FME Server and Desktop 2013.

 

I tried in FME desktop 2013 SP4 (20131025 - Build 13547 - WIN32) and i am getting following python error.

 

 

Python Exception <ImportError>: No module named fme

 

Error executing string `import fme

 

log_file_name = fme.logFileName

 

print 'log_file_name:',log_file_name'

 

FME_END_PYTHON failed to execute provided script

 

 

FME_END_PYTHON failure

 

Program Terminating

 

 

Is there any way to solve the problem in this FME version?

 

 

Thanks.

 

 


Hi Subrat,

 

 

try using pre-defined variable "FME_LogFileName" instead.

 

 

Takashi

Reply