Using Notifications 2016 R2 or later

Version 2

    Table of Contents


    What to expect in this section


    In this section of the course, we will be modifying our AF Applet to display any notification rules associated with the Tank element selected in the tree view.  We will also have our application display any associated notification instances (now as event frames) if the end-user selects a notification rule.  What we will end up with is something like:




    The behavior we want from the application is anytime a Tank element is selected in the tree, we want to show any Notification Rules for that particular Tank.




    And then anytime the end-user clicks on a given Notification Rule, we will show all Notification Instances (event frames) within the specified time range for the selected Notification Rule, which belongs to the selected Tank.





    Notifications as Event Frames


    We will be using Notifications 2016 R2 (2.8.5.x) or later for this series.  Notifications 2016 R2 requires a minimum of PI AF 2016 R2 (2.8.5), and PI AF SDK 2.8.5 requires targeting a .NET Framework 4.5.2 or later.


    The legacy Notifications 2012 (1.2.1205.x ) required 7 PI points for tracking each notification.  You may not have given this much thought as you created a template, but when you build out that template to 100 elements and each element may trigger 100 notifications, you would now have 70,000 additional PI points in your PI Data Archive!  Thankfully, zero additional PI points are needed for Notifications 2016, as the notification payload will be stored in an event frame.



    Overview of Work Flow


    Before we get hot and heavy into coding, we must first take time to configure the Tanks a Million database by adding event frame templates and notification rule templates.  An estimate of 70% of the work effort will be in configuration, and 30% of coding will be needed at the end.  What you may find along the way is that the initial configuration steps take the longest time, as you are building a critical foundation but once that foundation is laid, subsequent configuration steps and the eventual coding will become much easier.  An overview of the work flow would be:


    Configuration of Tanks a Million database

    1. Add Limit Traits to Tank Level
    2. Add Alarm State enumeration set
    3. Configure Event Frame Template(s)
      1. Create generic base event frame template
      2. Derive High and Low templates from that base
    4. Create Analysis Templates to generate event frames
    5. Create Notification Rule Templates

    Coding of AF Applet in Visual Studio

    1. Add 2 list boxes in lower right of form
      1. lbNotifcationRules
      2. lbNotificationInstances (for showing the event frames)
    2. Whenever the selected Tank element changes, find and display all Notification Rules for that Tank.
    3. Whenever a Notification Rule is selected, find and display all event frames generated by that Notification Rule within the requested time range.


    Good luck!