After running a workspace through the server, I need to delete the source file. Do I need to use the fmeengineconfig.txt? Any other way of doing that?
Kitty
After running a workspace through the server, I need to delete the source file. Do I need to use the fmeengineconfig.txt? Any other way of doing that?
Kitty
Hi @kitty
To delete a source dataset of your transformation the config files of FME server are not necessary.
Can you specify more on the subject?
Are you using the resources are of FME server for your input?
Are you uploading your input with the workspace?
Is it a dataset on a share location on the network?
Some more information might make it easier to answer.
Thank you for the quick answer!
I'm running a workspace that is suppose to take an XML file from a folder, do some process in it, and write it back to another folder as a new xml file.
My reader is a folder with XML files. I upload them through the workspace.
The xml files are on a share location in the network.
I need to delete them after running the workspace so I won't read them again.....
Thank you.
Kitty
You could shorten the "shelf life" of the uploaded files. From the manual:
By default, files are deleted 30 minutes after they are uploaded. You can change this availability period by manually editing the Data Upload web.xml file.
File location:
<FMEServerDir>\Utilities\tomcat\webapps\fmedataupload\WEB-INF\web.xml
Change:
<session-timeout>
30
</session-timeout>
For example, to change the availability of uploaded files to 90 minutes:
<session-timeout>
90
</session-timeout>
Hi @kitty
Ok thanks for the extra info it makes a difference in understanding what you are doing.
First of all, if you are using a shared network location, you dont necessarily need to upload the files with the workspace, as long as you can access the files form the server machine and use UNC paths for the location you can skip uploading them.
Secondly you can do some fancy shutdown python to delete the content of your input folder, or a simple systemcaller + dos combo.
Another option is to separate the 2 processes and notify a second workspace, once the first is successfully finished, to delete the input folder.
Thank you for the quick answer!
I'm running a workspace that is suppose to take an XML file from a folder, do some process in it, and write it back to another folder as a new xml file.
My reader is a folder with XML files. I upload them through the workspace.
The xml files are on a share location in the network.
I need to delete them after running the workspace so I won't read them again.....
Thank you.
Kitty
import fme
import os
input_xml = FME_MacroValuese'INPUT_XML_DATASET']
if fme.status:
os.remove(input_xml)
This assumes that the XML file is referenced using the published parameter INPUT_XML_DATASET
I'll try it ,
Thank you !
Here is a simple workspace with python inside that deletes a file. You can use the python after a FeatureWriter.
I would not encourage editing the fmeengineconfig.txt