I am working on a SharePoin2010 webpart development which uses the AF SDK to get some values from the the AF by using the GetValues() function. Please see the code snippet below for how I am using it.
However, it is getting the recorded values for the past 20 years till now as expected in our DEV environment (only one WFE), and one of the WFEs in the TEST environment, but keep getting the snapshot/interpolated value on the other WFE in TEST environment. (Two WFEs in the TEST environment.) On this specific WFE in the TEST environment, it always has the entry with the current timestamp when the request is made and the most recent value since last time updated.
All of the tests are pulling the data from the same AF server (AF Server 2010 R2), AF attributes, and the same PI tags. (Two PI servers in the PI collective)
So I am really confused why the same code behaves differently in this WFE. Any thoughts? Thank you.
AFTimeRange timerange = new AFTimeRange(); timerange.StartTime= new AFTime(DateTime.UtcNow.AddYears(-20)); timerange.EndTime = new AFTime(DateTime.UtcNow); AFAttribute attr= (AFAttribute)AFObject.FindObject(attributePath); valueCollection = attr.GetValues(timerange, 0, null);