Unable to Retire cmdb_ci Records with last_scan Older Than 30 Days via Retire Policy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @颯史小
Check these 2 links . hope it will help you.
https://www.servicenow.com/community/cmdb-forum/cmdb-data-manager-retirement-policies/m-p/3084239
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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 Rule — Retirement 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
@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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
32m ago
Hi @颯史小 ,
Please follow the below steps to create a Data Management Policy:
Navigate to CMDB Workspace.
Open the Management tab. In the Quick Links section under Management, select Data Manager.
Click on Create New Policy to create a new Data Management Policy.
In the General tab, fill in the mandatory fields such as Name and Policy Type. Select the Policy Type as Retire, then click Continue.
In the Filters tab, apply the required conditions to filter the CIs. Click Apply Filter, review the records, and then click Continue.
- Choose the assignment type for the task — either a specific User, a User field, or a Group.
- In the Options tab, select the Subflow that should run after the scheduled job executes.
In the Schedule tab, click continue to schedule the Policy.
Review the policy details and click Publish Policy.
Navigate to Scheduled Jobs and search for Retire Policy Processor.
Open the scheduled job and click Execute Now to run the policy manually.
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.
