Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Can not view attachments created from watched folder?

_hussam_
Level 3
Level 3

Hi,

I'm facing a problem with the watched folder files, they appear under the Attachment tab for the user, but with broken links, i.e. "The requested resource () is not available" error.

what I did is simply create a new process with watched folder start point, define a list-document variable as I/O and assign this variable to a user service?

all files are under the attachment tab but if I click on any file "Http 404 The requested resource () is not available" error appears, I noticed that the attachments are named with the full url, i.e d:\..\...\name.pdf.

any help

Hussam

3 Replies
Jon_Bionda
Level 4
Level 4

there was a bug for a similar type of problem when the form (not an attachment) was loaded from a document variable that came from disk and contained backslashes in the filename attribute of the doc.  the url generated for this document was invalid causing a 404.  Contact support and get the Process Management patch for your version.

_hussam_
Level 3
Level 3

I'll contact the support  and let you know,

thanks

_hussam_
Level 3
Level 3

Hi,

regarding to this issue, we found a workaround, that modifies the document attributes, by doing this step the attachment will be available and can be read

we used "setDocAttribute(/process_data/@docTemp, "wsfilename", getDocAttribute(/process_data/@docTemp,"basename") )" in some cases, and the following script in other cases:

import java.util.List;
String fileName;
String pathName;
String fileUrl;
com.adobe.idp.Document doc;
System.out.println("-----------------------------Get Docs------------------------");
List docList = patExecContext.getProcessDataListValue("/process_data/listOfDocs");
for (int i=0;i<docList.size();i++){
doc=docList.get(i);
doc.setAttribute("wsfilename",doc.getAttribute("basename"));
docList.set(i,doc);

}

patExecContext.setProcessDataListValue("/process_data/listOfAttachments",docList );
System.out.println("-----------------------------/Get Docs------------------------");

hope this will be helpful

Hussam