0

I'm new to BusinessWorks. Here is the basic flow of my application:

enter image description here

  1. ReceiveMail

    Basic configuration. I'm positive this is working.

  2. Flow (Link)

    Checks for an attachment

enter image description here

  1. Log

    Outputs the attachment name like Email has attachment: application/xml; name="test.xml"

enter image description here

  1. flow (link)

    Checks if it is the right attachment (currently "test.xml")

enter image description here

  1. WriteFile

    Writes the file from $ReceiveMail/tns1:mimeEnvelopeElement/mimePart1/textContent

enter image description here

enter image description here

  1. Log

    Output filename from $WriteFile/fileInfo/fullName

enter image description here


So, given all that, here is my output:

12:23:22.551 INFO: Started BW Application [EmailTest.application:1.0]
12:23:53.058 INFO: Email has attachment: application/xml; name="test.xml"
12:23:53.062 INFO: File written: C:\temp\out\test.xml

This tells me that the path checking for the "test.xml" attachment worked. It also tells me that WriteFile is passing what I would expect as $WriteFile/fileInfo/fullName

What am I doing wrong?

Community
  • 1
  • 1

1 Answers1

0

So I was using WriteActivityInputTextClass in the WriteFile process, as you can see in the second WriteFile screenshot. I changed "Write As" to binary on the first screenshot and then I had to remap the content and now it works.

I discovered this by arbitrarily attaching a couple HTML files to my email and removing the filename filter. These worked fine.