Clarity Service Management

Expand all | Collapse all

Tools.Addrootcausecomment creating multiple copies of the same comment

  • 1.  Tools.Addrootcausecomment creating multiple copies of the same comment

    Posted 01-27-2015 05:54 PM

    I recently coded a Tools.Addrootcausecomment to track when an event hit certain conditions in a business logic modules.    I received over 1100 comments for a single event.  There should be only 1 comment for this event.   I have been trying to figure out why I am receiving multiple comments.   I have the Tools.Addrootcausecomment statement coded in other business logic modules which do not make multiple copies of the same comment.  The difference in this module is I added the Tools.Addrootcausecomment statement to the OnPeriodEnd clause rather than in the OnEventDetails clause.  Any idea on what could be causing the multiple comments to appear?



  • 2.  Re: Tools.Addrootcausecomment creating multiple copies of the same comment

    Posted 02-02-2015 06:27 PM

    Hi All - Any ideas here for Kathleen? Thanks! Chris

    Kathleen Grimm wrote:

     

    I recently coded a Tools.Addrootcausecomment to track when an event hit certain conditions in a business logic modules.    I received over 1100 comments for a single event.  There should be only 1 comment for this event.   I have been trying to figure out why I am receiving multiple comments.   I have the Tools.Addrootcausecomment statement coded in other business logic modules which do not make multiple copies of the same comment.  The difference in this module is I added the Tools.Addrootcausecomment statement to the OnPeriodEnd clause rather than in the OnEventDetails clause.  Any idea on what could be causing the multiple comments to appear?



  • 3.  Re: Tools.Addrootcausecomment creating multiple copies of the same comment

    Posted 02-03-2015 03:41 AM

    Hi Kathleen,

     

    When Tools.Addrootcasusecomment is place in the OnPeriodEnd method, then it is called for each and every period for which the contract is effective. And depending on selected granularities this can have a big effect and this is why you are seeing over 1100 comments.

    I would protect the Tools.Addrootcasusecomment with a boolean flag to prevent it being triggered multiple times

     

    Best regards,

    Peter