I want to write a history component that tracks changes to a specific type of object and records the history lines based on the difference. Please note that this is not a general audit system, it is specific to one type of object.
I believe that I can connect to the sleep mode event model and listen to the events that tell me when everything has changed, keep track of any changes in instances of the type of objects that interest me, and then create my own code to generate history lines.
I want the history lines to be written in one transaction and ideally use sleep mode (therefore use the same session)
I have some questions / problems
- What sleep events should I catch, assuming that I want to catch only the changes?
- How can I participate in the same session / transaction as the session that generates events. I read that there are problems associated with the session inside the event handlers?
Any help was appreciated.
source share