I have one problem i am thinking how to solve. My workbench is started from python script. Workbench reads xml file, but name of xml file is each time different. So is it possible to solve this with generic reader or with another python script which will read folder where is xml file, find the name of xml file and proceed it to the fme as a reader? Any other idea?
Assuming you have only the one file you need to read in a directory of its own, you can setup your reader to read the directory for any and all .xml files. Right-click on your reader, select Update.., click on the "+" button, add the directory, and remove the reference to the direct .xml file that you probably already have. FME will now read any xml file in that directory, even if the name changes. I have done this in the past with .dwg files also. Just tested it with a xml file by running the workspace, changing the filename, then running again. It read the xml file everytime and recognized the filename change in the
fme_basename attribute, which I had exposed.
That is the simplest approach. You could also use a startup Python script and have it read the directory, then feed the filename into the workflow.