CMDB Health Result Tasks Creation

Rowella Montell
Tera Contributor

Hi!

We are getting a task created in each metric results (Duplicate, Orphan, Stale) and I'm wondering how these tasks are created as I cannot find where and/or how are they being created? I've noticed that some CI of the class name we have tasks created on them and some doesn't. I tried to replicate the issue in PDI and turn on the Task creation tab on the Health Preference module and it does create the tasks, then I've turned it off and no further tasks were created in my PDI. However when the dashboard is run again on our dev instance there are still tasks created even if the task creation tab is already off in our Health Preference module.

 

Can anyone advise as to how and/or where can I further check the trigger for the task creation in CMDB Health Result?

 

I have attached screenshots below from my PDI for reference. Thank you!

1 ACCEPTED SOLUTION

Definitely you can do that, and I would suggest doing that only as it is not a good practice to delete records on the platform unless if it is really needed to do it.

Just Update your script as below and you should be good:

removeTask();
function removeTask(){
	var gr = new GlideRecord('stale_ci_remediation'); // Change it to your Table Name where task is present if needed
	gr.addEncodedQuery('state=1'); // This will run only for Open Records
	gr.query();
	while(gr.next()){
		gr.state = 3; // Value for Closed Complete
		gr.update();
	}
}

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

12 REPLIES 12

thank you!  the option above to toggle the task to on from Health Preference is not available, the toggles are not visible (Rome), I was unable to find the table name until I came across your post so thanks. Have set the metric to active and create task to true and all working now and managed to complete the CMDB Health course.find_real_file.png

@Linda McAleer Glad to help!!

Regards,

Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Karthick Nagara
Tera Expert

@shloke04 @Rowella Montell ,

 

Cant we stop the Duplicate task generation. Even after setting the Health preference Create tasks = false for Duplicates, it still creates deduplication tasks

 

I guess it happens through IRE and CI identification rules but is there any way we can stop these tasks getting generated?