Where does Workspace store activity stream?

edfingleton
Tera Expert

Hi,

 

I'm completing a the extension of a SAR obfuscation requirement into the CSM area of ServiceNow and one of the requirements is the clearing down of all work_notes and comments from audit, history, & journals. This appeared to be working well and when i look at the tables directly all has been deleted and it doesn't show when looking at the platform UI, however when looking at the agent workspace you can still see some of the work note entries on there. 

There must be another cache location, but I'm struggling to find it or find any documentation on it.

 

Can anyone share any pointers as to where i should be looking?

 

Thanks,


Ed

1 ACCEPTED SOLUTION

edfingleton
Tera Expert

Ok, After much digging I have found a table called sys_activity which feeds the activity stream on workspaces.

This table has a shard type table rotation on it so you will see multiple tables named akin to sys_activity0000, sys_activity0001 etc. Records are stored in here based upon a hashing algorithm to speed up retrieval.

 

If you delete only a single row for a work_note from the sys_activity table but don't actually remove the work_note it will NOT regenerate and include that work_note in the stream again. 

 

For my purposes I am able to delete all entries for a given documentid on the sys_activity table and ServiceNow figures out which shard to actually delete it from, I don't need to worry about that bit. When a user next goes to the record the sys_activity entries will be regenerated.

 

Hope this helps someone finding this in the future!

 

Ed

 

 

View solution in original post

3 REPLIES 3

edfingleton
Tera Expert

Ok, After much digging I have found a table called sys_activity which feeds the activity stream on workspaces.

This table has a shard type table rotation on it so you will see multiple tables named akin to sys_activity0000, sys_activity0001 etc. Records are stored in here based upon a hashing algorithm to speed up retrieval.

 

If you delete only a single row for a work_note from the sys_activity table but don't actually remove the work_note it will NOT regenerate and include that work_note in the stream again. 

 

For my purposes I am able to delete all entries for a given documentid on the sys_activity table and ServiceNow figures out which shard to actually delete it from, I don't need to worry about that bit. When a user next goes to the record the sys_activity entries will be regenerated.

 

Hope this helps someone finding this in the future!

 

Ed

 

 

oster
Tera Guru

Hello,

I need to be able to delete field changes stored in activity stream. I tried to delete it from "history_line" which works and is reflected on the record in core ui. But in workspace it is still there.

 

If I enter sys_activity table I find only email and a "header" activity for my record. You mention "For my purposes I am able to delete all entries for a given documentid on the sys_activity table and ServiceNow figures out which shard to actually delete it from" how is this done? How can I delete only one entry of field changes.

 

Thanks

I noticed the same things... I reckon the design of the system has changed since 2023.