- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 09:35 AM
Hi All,
We have a requirement to implement data archiving for problem and problem related records.
We have implemented the below functionality.
Problem:
I have created an archive rule and its archive related records for the following
Below are the archive related records which does not have the reference field so I used dot-walking for archiving the following related records.
- PTASK Ticket
- Related changes
- Related CSI
->It works fine but need to confirm whether it is a best Practice or not? and also wanted to know from where the reference field choices comes from?
And below are the archive related records which already had a reference so I used the existing one.
- Attachments
- SLA's
Problem Subtask:
->We also need to archive the Problem subtask related records as well. Can we achieve it using the same archive rule or need to create a new archive rule?
Any suggestions/ideas. Please guide me on this.
Thanks in advance,
Prashanthi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 03:42 AM
This is from wiki
- The Archive action updates the Document ID of the related record to point to the archived table. For example, if you select the Table sys ID Attachment(sys_attachment)* reference, the related record rule updates the attachment record to change the Document ID to refer to the archived table record.
Attachment is not actually archived, but it shows up on the archived record same way as it was on the main record. Only the reference on the sys_attachment table gets updated. If this is not happening in your case automatically then contact HI.
Or you don't want the above scenario and you are trying to achieve something else?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-08-2016 10:13 AM
I didn't understand the first part of the problem,for the second part, sub tasks:
There is no way i could figure out how to get the sub tasks done, i don't think its possible. so what i did instead was to have a separate job to archive task, and its chil task(problem task and its child in your case)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 12:35 AM
Hi Anurag,
Thanks for your response.
I have created an archive rule for Problem table and created a archive related records for the following.
For attachments and SLA's I configured using the reference field in the archive related records.
For attachments the reference field is Table Sys ID in Attachment.
But for Problem subtask we didn't find the reference Field, so we used dot-walking for that reference field.
For example: u_problem_subtask.parent.(updated it in the list view).
It works fine but need to confirm whether it is a best Practice or not? and also wanted to know from where the reference field choices comes from?
Problem subtask:
If we create a new archive rule for Problem subtask and its related records.Will it execute separately and is there any order we can specify it to run?
Regards,
Prashanthi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-09-2016 02:26 AM
For attachment you don't really need to do anything. How irt works in the background is, the reference to the task on sys_attachment table is updates with the sys_id of the archived record. Hence the attachment shows up in the archived record. For SLA you can easily configure the related record job on problem.
Problem subtask will be connected to problem parent by parent field only. you should see something like problem task -> parent
There is a field called parent on the archived job, but that will just govern the sequence of the jobs running, but you cannot really configure that if problem x gets archived then in the child archival job it should archive problem tasks and sub tasks where parent was problem x.
I recall there is also a field called top_task, which always holds the topmost record, i have used extensively in project module, not sure if its available in problem also or not.
i understand that you are worried about how will u maintain the sanity of records that are half archived, this is what i did to overcome this:
Run archival jobs for short period, Eg, dont run for all records that are older that 6 months, but run in batches, first archive all problema nd problem tasks that are older than 3 years, then once that is complete then come to 2.5 years then 2 and so on.
Archived records are anyways flat files so you should not be concerned about references breaking.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2016 03:28 AM
Thanks for your response Anurag.
For attachment we need to configure the related records job else it didn't archive the attachment.
Ref: Archiving Data - ServiceNow Wiki
For Problem subtask as you mentioned I gave the Parent field as referernce(main Archive rule) it is working now.
Regards,Prashanthi