Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
8 replies
Subscribers
5 subscribers
Views
3357 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Plug-Ins
#Plugin I am writing a plugin for Appian in Java (an expression function plugin)
malcolmp
over 8 years ago
#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
malcolmp
over 8 years ago
Akshaya, thanks for your response! I printed out the id which I used to in the cs.getVersion(....), and then I printed out doc.getId() and the two were the same. So that makes me think that the document id did indeed exist in Appian. Does my use of the download method/syntax look correct?
Document doc = cs.download(pdfsToMerge[i], ContentConstants.VERSION_CURRENT, false)[0];
I began to wonder if perhaps there was something wrong with the ContentConstants.VERSION_CURRENT parameter. When I printed that out it said it was equal to -1. Does that sound right?
Thanks for your help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
malcolmp
over 8 years ago
Akshaya, thanks for your response! I printed out the id which I used to in the cs.getVersion(....), and then I printed out doc.getId() and the two were the same. So that makes me think that the document id did indeed exist in Appian. Does my use of the download method/syntax look correct?
Document doc = cs.download(pdfsToMerge[i], ContentConstants.VERSION_CURRENT, false)[0];
I began to wonder if perhaps there was something wrong with the ContentConstants.VERSION_CURRENT parameter. When I printed that out it said it was equal to -1. Does that sound right?
Thanks for your help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data