Hi All, I am creating a plugin to get all portal alerts for a process based on p

Hi All, I am creating a plugin to get all portal alerts for a process based on process ID. It is returning expected result while testing with test process model. However when integrate with some running application, it does not retrieve alert details.

Appreciate any suggestions. Thanks in advance!

OriginalPostID-226103

OriginalPostID-226103

  Discussion posts and replies are publicly visible

Parents
  • Below is my code snippet-
    ServiceContext sc = ServiceContextFactory.getAdministratorServiceContext();
    this.portalNotificationService = ServiceLocator.getPortalNotificationService(sc);

    ResultPage rp = this.portalNotificationService.getNotificationsPaging(startIndex, Constants.COUNT_ALL, Notification.SORT_BY_TIMESTAMP, Constants.SORT_ORDER_DESCENDING);

    Notification[] notifications = (Notification[])rp.getResults();

    I am running loop on notifications and get the attributes(processName, taskName) of each notification. Notifications array fetches all the alerts that is created by test model by does not retrieve the running application.

    No error thrown while execution.
    Appian version i am using is 16.1


Reply
  • Below is my code snippet-
    ServiceContext sc = ServiceContextFactory.getAdministratorServiceContext();
    this.portalNotificationService = ServiceLocator.getPortalNotificationService(sc);

    ResultPage rp = this.portalNotificationService.getNotificationsPaging(startIndex, Constants.COUNT_ALL, Notification.SORT_BY_TIMESTAMP, Constants.SORT_ORDER_DESCENDING);

    Notification[] notifications = (Notification[])rp.getResults();

    I am running loop on notifications and get the attributes(processName, taskName) of each notification. Notifications array fetches all the alerts that is created by test model by does not retrieve the running application.

    No error thrown while execution.
    Appian version i am using is 16.1


Children
No Data