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?

5 REPLIES 5

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?

Hi @颯史小 ,

Please follow the below steps to create a Data Management Policy:

  1. Navigate to CMDB Workspace.
    Screenshot 2026-02-25 at 2.26.47 PM.png

  2. Open the Management tab. In the Quick Links section under Management, select Data Manager.
    Screenshot 2026-02-25 at 2.29.29 PM.png
    Screenshot 2026-02-25 at 2.29.54 PM.png

  3. Click on Create New Policy to create a new Data Management Policy.
    Screenshot 2026-02-25 at 2.30.17 PM.png

  4. In the General tab, fill in the mandatory fields such as Name and Policy Type. Select the Policy Type as Retire, then click Continue.
    Screenshot 2026-02-25 at 2.31.02 PM.png

  5. In the Filters tab, apply the required conditions to filter the CIs. Click Apply Filter, review the records, and then click Continue.
    Screenshot 2026-02-25 at 2.32.45 PM.png
    Screenshot 2026-02-25 at 2.33.04 PM.png

  6. Choose the assignment type for the task — either a specific User, a User field, or a Group.
    Screenshot 2026-02-25 at 2.33.13 PM.png
    Screenshot 2026-02-25 at 2.33.54 PM.png
  7. In the Options tab, select the Subflow that should run after the scheduled job executes.
    Screenshot 2026-02-25 at 2.34.00 PM.png
  8. In the Schedule tab, click continue to schedule the Policy.
    Screenshot 2026-02-25 at 2.34.07 PM.png

  9. Review the policy details and click Publish Policy.
    Screenshot 2026-02-25 at 2.34.16 PM.png

  10. Navigate to Scheduled Jobs and search for Retire Policy Processor.
    Screenshot 2026-02-25 at 2.34.34 PM.png
    Screenshot 2026-02-25 at 2.35.12 PM.png

  11. Open the scheduled job and click Execute Now to run the policy manually.
    Screenshot 2026-02-25 at 2.35.37 PM.png

  12. Once executed, the system creates CMDB Data Management Tasks with the Assigned To field populated based on your configuration. You can view these tasks in the My Work tab within the Workspace or directly from the cmdb_data_management_task table.

    Regards,
    Maniteja.