Skip to main content

Started to build a FME Workspace that would test in-coming email for 2 files attachments with a specific pattern. I'll email reply back if the 2 files are not found, if found then save them to a network UNC location.

 

I've got reading email json -> into 2 ListSearcher (1 for each file)

 

This is where I'm hung up as testing for the 2 specific files (it has 2 files and very specific for each to the 2 files)?

 

test_save

Hello @hlouie​ ,

Did you check this tutorial from Safe?:

https://community.safe.com/s/article/receiving-email-part-3-using-email-attachments

You will be able to save the attachments to UNC location.


I've been able to save the attachments but FeatureWriter strips some of the features. I'm wondering if there is a Binary way of saving the file.featurewriterThank-you anhphuongt,


Do you mean some elements in the AutoCAD Map 3D Object Data is missing some elements compared to the original file?

Maybe you can try with a real AutoCAD Map 3D Object Data Writer:

4y3rWh2sxi


Do you mean some elements in the AutoCAD Map 3D Object Data is missing some elements compared to the original file?

Maybe you can try with a real AutoCAD Map 3D Object Data Writer:

4y3rWh2sxi

Bingo (yes). When using FeatureWriter, I need to select an output format. I'm wondering if the FeatureWriter could be Dyanamic in output?

Reasoning, one of the input Autodesk DWG is Civil3D combined with ObjectData. So when selecting saving in a select format some features are removed during the saving process.


I don't think FME can dynamically choose the Writer depending on the data just by using the writer to do it.

Even if it is possible by having some tester to direct different type of data into separate writer, you still have 2 different files. Not everything in the same output file.


I haven't ever worked with email attachments, but could you use a FileCopy Writer to save the attachments to the UNC?


Solution was simpler after @jdh​ suggested to use FileCopy Writer.

FME Server holds the email JSON

'C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\subscriptions\\d592d6a2301c4084a71a2cebe92c0599.json'

FME Server holds the email attachments

Performing query against PATH dataset `C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\emailattachments\\20201026133726-engprojects-80000_qaqc\\'

FileCopy from FME Server RESOURCE Location to UNC location

File Copy Writer: Received copy request from 'C:\\ProgramData\\Safe Software\\FME Server\\resources\\system\\temp\\emailattachments\\20201026133726-engprojects-80000_qaqc\\80000_ConstructionRecorded1_1.0.dwg' to '\\\\???\\???\\???\\???\\???\\???\\80000_ConstructionRecorded1_1.0.dwg'

 


Reply