Thursday, January 8, 2015

#369 UMS Email adapter (part 2)--> send PDF file as an email attachment

Simple scenario -

Read in a pdf file and send it as a pdf attachment.









fileService_4 configuration -














































































The strategy I am using here, is not to read the contents, so I get the file and
directory names from the header. These I copy into process variables -


















This information will be used in a function to
add the file as an attachment to the email.

I will be using the ora:readFile function -
e.g. ora:readFile('file:///c:/docs/My.pdf'')

I need to swap the "\" to "/" in the directory variable.
I then create a variable with the value'file:///c:/docs/My.pdf''






I then set the attachment values on the EmailPDF activity as follows -








I deploy and test -

For testing purposes, I will drop the BAM pdf into the input directory.










The email arrives with the attachment -














I open the pdf -











No comments:

Post a Comment