Workaround for PRB1382401 in KB0853599 not working

Senai T
Tera Contributor

This issue has been identified and documented in the ServiceNow Support knowledge base article KB0853599. For detailed information about the problem, please refer to this link
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0853599.

 

Description of the problem is here:

Discovery Schedule does not complete with below symptoms:

> Discovery status stuck in Active, may be cancelled if Max run time is set for the schedule

> WMI: Classify input ecc stuck in "ready" state, other ecc records are processed

> the source (IP) of the stuck input ecc records belong to same device

> discovery_device_duplicate_ips records created for the same status & device, and state is "Skip IP"

 

ServiceNow is actively addressing the issue in PRB1382401.

In this post, I am sharing a temporary workaround suggested by ServiceNow in the same article. Although the attached business rule initially had a flaw that did not resolve our issue, we identified a specific line of code causing the problem. After making the necessary change, the business rule worked effectively for us. I am sharing this information for the benefit of anyone who might encounter a similar issue.

Below is the script section of the business rule. Please review the comments I have added within the business rule. If you comment out the line that sets "completed" back to zero, it should resolve the issue for you.



(function executeRule(current, previous /*null when async*/) {

var mugr = GlideMultipleUpdate("discovery_device_history");
mugr.setIncrement('completed', 1); //---------here the completed field is incremented which is good
mugr.setValue('last_state','Identified, ignored extra IP');
//mugr.setValue('completed',0); // --------but here the completed field is brought back to 0 again which nullifies the change
mugr.addQuery('source', current.source);
mugr.addQuery('status', current.status);
mugr.execute();

   
var mugr2 = GlideMultipleUpdate("discovery_status");
mugr2.setIncrement('completed', 1);
mugr2.addQuery("sys_id", current.status);
mugr2.execute();

})(current, previous);




0 REPLIES 0