Hi Guys, is there a way to call an Appian function within my Java Code (Smart Se

Hi Guys, is there a way to call an Appian function within my Java Code (Smart Service Plugin)? I need to use todocument() function to convert the input string (ex. "[DocumentId: xxxx]" ) to a document.
Also, once I got the document, I need to get the server path/filename of that file.
Thanks in advance!

OriginalPostID-192788

OriginalPostID-192788

  Discussion posts and replies are publicly visible

Parents
  • Use tointeger() function in Appian to get the Document ID.
    Pass the Long value to your Java Code. Using the Document Id, We get doc path, document etc..
    Go though API, forum.appian.com/.../ you'll find couple of document functions, which will do your job.
                                                      
    Sample Java Code

    long docId;
    String docPath=null;
    Document document = new Document();
    document = this.contentService.download(this.docId[i], ContentConstants.VERSION_CURRENT, Boolean.valueOf(false))[0];                    
    String docName=document.getDisplayName();
    String docInternalPath=document.getInternalFilename();
Reply
  • Use tointeger() function in Appian to get the Document ID.
    Pass the Long value to your Java Code. Using the Document Id, We get doc path, document etc..
    Go though API, forum.appian.com/.../ you'll find couple of document functions, which will do your job.
                                                      
    Sample Java Code

    long docId;
    String docPath=null;
    Document document = new Document();
    document = this.contentService.download(this.docId[i], ContentConstants.VERSION_CURRENT, Boolean.valueOf(false))[0];                    
    String docName=document.getDisplayName();
    String docInternalPath=document.getInternalFilename();
Children
No Data