AnsweredAssumed Answered

Add child Event Frame generates an error

Question asked by AlexCote Champion on Sep 9, 2015
Latest reply on Sep 9, 2015 by bshang

Hello PISquare geeks,

 

I built an AFSDK app that generates thousand of Event Frames per day and that have reprocessing capability. Once in a while, the following error is trapped:

 

Cannot add EventFrame 'EFName' with UniqueID '2d06ea22-e945-4bdb-0000-00000022c0e3' because there is another EventFrame with an identical UniqueID

 

Here is one with the stack trace:

2015/09/09 08:46:25|An error occured while executing command ChangeEventDescription. Details: System.InvalidOperationException: Cannot add EventFrame 'Slab ID 1' with UniqueID '2d06ea22-e945-4bdb-0000-00000022b6d5' because there is another EventFrame with an identical UniqueID.

   at OSIsoft.AF.PISystem.CheckServerError(dcServerError err, Boolean firstAttempt)

   at OSIsoft.AF.Support.AFSerialProxy.Call(String rpcName, ProxyDelegate codeBlock)

   at OSIsoft.AF.Support.AFSerialProxy.CheckInEventFrame(dcEventFrame[] changes, dcObjectIdentity[] deletedIdentities, Boolean& updatedUOM, Int64[]& securityIds)

   at OSIsoft.AF.EventFrame.AFEventFrame.RemoteCheckInEventFrame(AFDatabase database, dcEventFrame[] changes, dcObjectIdentity[] deletedIdentities)

   at OSIsoft.AF.AFDatabase.SaveEventFrames(Boolean doCheckIn, Boolean disableObjectListCheckIn, Int32 maxChangedItems, List`1 appliedList, List`1 changeList, List`1 deleteList)

   at OSIsoft.AF.AFDatabase.ProcessDatabaseApplyCheckInChanges(ProcessMode mode, AFCheckedOutMode checkedOutMode, IEnumerable`1 objList, List`1 appliedList, HashSet`1 elementsWithAutoCreatedAnalyses, Boolean& dbPagedRefreshRequired)

   at OSIsoft.AF.AFDatabase.ProcessDatabaseChanges(ProcessMode mode, AFCheckedOutMode checkedOutMode, IEnumerable`1 objList, List`1 appliedList, HashSet`1 elementsWithAutoCreatedAnalyses)

   at OSIsoft.AF.Support.AFProcessChangesList.ProcessList(ProcessMode mode)

   at OSIsoft.AF.Support.AFTransactable.CheckIn(Boolean disableObjectListCheckIn)

 

Here is the snippet

 

What am I doing wrong and how can I ensure that a new EF will have a truly unique ID?

 

Thanks for your Help

 

Alex @ ATS Process Automation Solutions

Outcomes