1 Reply Latest reply on Jul 29, 2016 9:01 PM by Mike Zboray

    How get notification and active instances on AF Notification server 2016 Beta?

    Robatjazi

      Hello All,

       

      I want to get all active event frames for all element with AFSDK 2.8.2.

      Is is possible to get all with one query instead of iterating on elements and get event frames for each element. It will be slow.

       

      Regards,

      Majid

        • Re: How get notification and active instances on AF Notification server 2016 Beta?
          Mike Zboray

          This is pretty straight forward with AFEventFrameSearch. This filter you want is InProgress:True:

          AFEventFrameSearch efSearch = new AFEventFrameSearch(db, string.Empty, "InProgress:True");
          var efs = efSearch.FindEventFrames();
          foreach (var ef in efs)
          {
            // process each EF
          }
          

          If this is not for a UI where you might be only retrieving, say dozens of items, you may want to enable server-side caching by setting the CacheTimeout to a non-zero value. This can significantly decrease the query time but uses more server resources. I would refresh the search as well to make sure the results were up to date, in that case.