#Plugin I am writing a plugin for Appian in Java (an expression function plugin)

#Plugin I am writing a plugin for Appian in Java (an expression function plugin) into which I am passing an array of document id’s. I’d like to access each document represented by those id’s, however I have been unable to. My goal is to use an open source pdf reader on these pdf documents I have passed into the plugin. It will look like this: pdfReaderArray.add(new PdfReader(doc.getInternalFilename())); The problem I am experiencing is, while I can see (through debug statements) that the document id’s exist and are not null, the document’s internal filename is always null. The public Java API has been very helpful as have some of the shared components I have looked at for guidance. I have tried using the getVersion method of the Content Service in this manner:

Document doc = (Document) cs.getVersion(pdfsToMerge[i], ContentConstants.VERSION_CURRENT);

This seems to return a document, however as the API indicates, the getVersion method: “Gets the spec...

OriginalPostID-163107

OriginalPostID-163107

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    To test if the id exist, you can go to designer -> Documents and search for the id. If the id exist, it will prompt you to download the document. Alternatively, you can use document unction and create a test expression to test if the id exist e.g., document(documetId,"name") should return the name of the document if document exists.
Reply
  • 0
    Certified Lead Developer
    To test if the id exist, you can go to designer -> Documents and search for the id. If the id exist, it will prompt you to download the document. Alternatively, you can use document unction and create a test expression to test if the id exist e.g., document(documetId,"name") should return the name of the document if document exists.
Children
No Data