I need some help with a problem I have about sending out log files from FME server jobs. I have a workspace that runs a bunch of jobs using the fmeserverjobsubmitter. if it fails, I capture the log file from that job to a network location. then I send an email with the log files attached using the Emailer. only problem is if multiple jobs failed. it will send multiple emails which I don't want it to do. i also do not want to bundle up the logs files as 1 zip file. I used the featureWriter to write out a txt file of all the log file paths and then the featureReader to read it back, but not sure how to attach it as the attachment parameter expect just 1 file path. TIA!
If you publish the Attachments parameter (ATTACHMENTTABLE), add a couple files and run the workspace, you'll have the required syntax to pass more than one file.
C:\apps\FME17.1-32-b17539\fme.exe E:\FME_TEMP\wb-xlate-1509381727869_31592
--ATTACHMENTTABLE "E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>1.jpg 1 image/jpeg E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>2.log 2 autodetect"
The only complex thing you have to do is to encode the path to the files with <backslash> and <space> and maybe any other characters to be encoded.
There may be a TCL or Python call to encode the path using FME functions.
To publish the Attachments parameter, in the navigator window (1), open the Emailer properties (2) and right-click on the Attachments Really parameter and select Create User Parameter...
This will add a published parameter that you can use to select the files to attach.
At this point, if you run the workspace, you'll have in the log window the information I displayed above.
Then, you are ready to use your workspace and attach any number of files to your email by supplying a correct value to the ATTACHMENTTABLE parameter.
If you publish the Attachments parameter (ATTACHMENTTABLE), add a couple files and run the workspace, you'll have the required syntax to pass more than one file.
C:\apps\FME17.1-32-b17539\fme.exe E:\FME_TEMP\wb-xlate-1509381727869_31592
--ATTACHMENTTABLE "E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>1.jpg 1 image/jpeg E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>2.log 2 autodetect"
The only complex thing you have to do is to encode the path to the files with <backslash> and <space> and maybe any other characters to be encoded.
There may be a TCL or Python call to encode the path using FME functions.
To publish the Attachments parameter, in the navigator window (1), open the Emailer properties (2) and right-click on the Attachments Really parameter and select Create User Parameter...
This will add a published parameter that you can use to select the files to attach.
At this point, if you run the workspace, you'll have in the log window the information I displayed above.
Then, you are ready to use your workspace and attach any number of files to your email by supplying a correct value to the ATTACHMENTTABLE parameter.
Hi @tnarladni,
In the event you are running the job on FME Server you could also use the FMEServerEmailGenerator and send a list comma separated URL's as one attribute, after you have used an Aggregator to aggregate all the fails into one feature.
https://knowledge.safe.com/content/kbentry/55594/workflow-management-example-multiple-engines.html
https://knowledge.safe.com/articles/578/sending-email-part-5-sending-an-email-with-attachm-1.html
If you publish the Attachments parameter (ATTACHMENTTABLE), add a couple files and run the workspace, you'll have the required syntax to pass more than one file.
C:\apps\FME17.1-32-b17539\fme.exe E:\FME_TEMP\wb-xlate-1509381727869_31592
--ATTACHMENTTABLE "E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>1.jpg 1 image/jpeg E:<backslash>FME_TEMP<backslash>My<space>Log<space>Files<backslash>2.log 2 autodetect"
The only complex thing you have to do is to encode the path to the files with <backslash> and <space> and maybe any other characters to be encoded.
There may be a TCL or Python call to encode the path using FME functions.
To publish the Attachments parameter, in the navigator window (1), open the Emailer properties (2) and right-click on the Attachments Really parameter and select Create User Parameter...
This will add a published parameter that you can use to select the files to attach.
At this point, if you run the workspace, you'll have in the log window the information I displayed above.
Then, you are ready to use your workspace and attach any number of files to your email by supplying a correct value to the ATTACHMENTTABLE parameter.