3 Replies Latest reply on Apr 3, 2011 11:55 PM by hussam ihmaidi

    Can not view attachments created from watched folder?

    hussam ihmaidi

      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

        • 1. Re: Can not view attachments created from watched folder?
          Jon Bionda Level 3

          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.

          • 2. Re: Can not view attachments created from watched folder?
            hussam ihmaidi Level 1

            I'll contact the support  and let you know,

            thanks

            • 3. Re: Can not view attachments created from watched folder?
              hussam ihmaidi Level 1

              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