Unable to Retire cmdb_ci Records with last_scan Older Than 30 Days via Retire Policy

颯史小
Tera Contributor

I want to use the “Retire Policy” in CMDB Workspace > Data Manager to retire records in cmdb_ci whose last_scan date is older than 30 days.

I tried the following steps:

 

Open Manage retirement definitions (cmdb_retirement_custom_definitions)

Click Add definition

Create and save a definition using the above condition

 

However, when I try to save it, I get the error:

 

“The use of 'OR' conditions are not permitted when defining retirement state. Single conditions and conjoined conditions using 'AND' are allowed.”

 

Does this mean that this method cannot be used? Do I have no choice but to write a business rule?

I want to use the “Retire Policy” in CMDB Workspace > Data Manager to retire records in cmdb_ci whose last_scan date is older than 30 days.


I tried the following steps:

・Open Manage retirement definitions (cmdb_retirement_custom_definitions)
・Click Add definition
・Create and save a definition using the above condition

 

However, when I try to save it, I get the error:

“The use of 'OR' conditions are not permitted when defining retirement state. Single conditions and conjoined conditions using 'AND' are allowed.”

 

Does this mean that this method cannot be used? Do I have no choice but to write a business rule?

3 REPLIES 3

Tanushree Maiti
Mega Sage

Hi @颯史小 

 

Check these 2 links . hope it will help you.

https://www.servicenow.com/community/cmdb-forum/cmdb-data-manager-retirement-definition-and-retireme....

 

https://www.servicenow.com/community/cmdb-forum/cmdb-data-manager-retirement-policies/m-p/3084239

 

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Maniteja_2003
Tera Guru

Hello @颯史小 

The CMDB Retirement Custom Definition (cmdb_retirement_custom_definitions) table is used to define default retirement conditions for a specific CI class. These conditions are automatically applied when a retirement policy is created for that class.

There is a before Business RuleRetirement definition validation — on this table that validates the retirement definition. It explicitly does not allow OR conditions. Only single conditions or conditions combined using AND are supported.

That is why you are encountering this error while trying to save your definition.

Additionally, in Custom Definitions, you are restricted in the types of operators you can use (primarily “is”). Because of this limitation, the better approach is to create a Retirement Policy directly for the Computer class and specify the required conditions there, for example: Most recent discovery is before 30 days instead of using a custom definition.

 

Regards,
Maniteja

@Maniteja_2003 
Could you please explain how to create a Retirement Policy directly for the Computer class and how to configure the required conditions there? Also, could you clarify how this approach differs from using the CMDB Retirement Custom Definition (cmdb_retirement_custom_definitions) table?