getDocAttribute() issue

Avatar

Avatar

_Michael_Feicht

Avatar

_Michael_Feicht

_Michael_Feicht

11-02-2008

I've tried to use the XPath method getDocAttribute("filename") to get the original name of an attachment (receive mail action) without success.

I've also tried "name" and "file" but it didn't work either.



Finally I found out, that content-type (getContentType()) contains the filename too (e.g.: 'application/pdf;name="file.pdf"').

I found nothing about that issue in the manuals.



Does anybody know if that behavior is a bug or if the documentation is not up-to-date.



kind regards

Michael

Replies

Avatar

Avatar

Jasmin_Charbonn

Avatar

Jasmin_Charbonn

Jasmin_Charbonn

11-02-2008

Try "wsfilename" see if that gets you the document name.



Jasmin

Avatar

Avatar

_Michael_Feicht

Avatar

_Michael_Feicht

_Michael_Feicht

13-02-2008

Hi Jasmin,



thanks for your answer.



getDocAttribute(/process_data/@attachment, "wsfilename") does not work either.



Michael

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

13-02-2008

I have done this many times in all versions of the product without issue....I use the syntax



getDocAttribute(/process_data/@attachment, "file") and assign it to a string variable in a SetValue service.



The wsfilename attribute that Jasmin refers to would only be used if the attachment came from that envelope that is used in workspace.



Are you using an email endpoint or an email service inside of a process to get the attachment into the process?

Avatar

Avatar

_Michael_Feicht

Avatar

_Michael_Feicht

_Michael_Feicht

13-02-2008

Hi Paul,



thanks for your answer.



I use the email service for receiving emails which stores the attachments into a list of documents. Then I iterate through the list of attachments and extract the filename.

The getDocAttribute() method returns null, but the getDocContentType() method also contains the original filename.



I assume that the receive mail service does not set the attributes correctly.



kind regards

Michael

Avatar

Avatar

pguerett

Avatar

pguerett

pguerett

14-02-2008

I think you are right ..... I can assure you that it is set every other way. I have not used it your way yet so I cannot comment on it. I will try it and see.

Avatar

Avatar

Ruytero-HzmPcE

Avatar

Ruytero-HzmPcE

Ruytero-HzmPcE

26-03-2008

Michael Feichtegger,



If you are still facing this problem, have you tried using a Map instead of a List variable to store you attachments in?



If you use a map, the filenames of the attachments are used as the Keys of the map.



Regards,