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
  • Hi rahul, please advise if the contentService can only work if passed as a parameter to the constructor:

    ex.
    public GoogleCalendarCreateEvent(SmartServiceContext smartServiceCtx, ContentService contentService) {
                        super();
                        this.smartServiceCtx = smartServiceCtx;
                        this.contentService = contentService;
              }

    coz, currently I'm using it on a separate class that I'm calling on the run() method of the smart service class and it seems that the code below returns null.

    doc = this.contentService.download(documentId, ContentConstants.VERSION_CURRENT, Boolean.FALSE)[0];

    Thanks in advance!

Reply
  • Hi rahul, please advise if the contentService can only work if passed as a parameter to the constructor:

    ex.
    public GoogleCalendarCreateEvent(SmartServiceContext smartServiceCtx, ContentService contentService) {
                        super();
                        this.smartServiceCtx = smartServiceCtx;
                        this.contentService = contentService;
              }

    coz, currently I'm using it on a separate class that I'm calling on the run() method of the smart service class and it seems that the code below returns null.

    doc = this.contentService.download(documentId, ContentConstants.VERSION_CURRENT, Boolean.FALSE)[0];

    Thanks in advance!

Children
No Data