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
44m ago
@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?
