CSDM CI Lifecycle Management: LifeCycleUtil and Internal State Restoration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
ServiceNow’s Common Service Data Model (CSDM) introduces a standardized way to manage the lifecycle of Configuration Items (CIs) and Assets. Instead of relying on legacy fields like Install Status and Operational Status, CSDM defines a two-tier lifecycle framework:
Life Cycle Stage (high-level phase)
Life Cycle Status (detailed state)
To enforce this model consistently across CMDB, Asset Management, and ITOM, ServiceNow provides the out-of-box utility LifeCycleUtil.
CSDM Lifecycle Model Overview
Life Cycle Stage (Broad Phase)
Life Cycle Stage represents the high-level phase of a CI or Asset:
Draft / Development – Planning or design phase
Pre-Operational – Testing, staging, or pilot
Operational – Actively in use (production)
End of Operation – Retired, decommissioned, or pending disposal
Life Cycle Status (Granular State)
Life Cycle Status adds detail within a stage, such as:
Planned
Installed
Operational
Pending Disposal
CIs
are automatically synchronized with:Related Assets
Retired
Core Responsibilities of LifeCycleUtil
1. Legacy ↔ CSDM Lifecycle Mapping
LifeCycleUtil maps legacy fields:
install_status
operational_status
to CSDM fields:
life_cycle_stage
life_cycle_stage_status
2. Lifecycle Validation
Before insert or update, LifeCycleUtil ensures:
Both Stage and Status are provided
The combination is valid per life_cycle_control
Invalid combinations are blocked
3. Synchronization Between CI and AssetWhen enabled via system property:
csdm.lifecycle.sync.between.ci.and.asset.activated = trueLifecycle changes on:
4. Bulk Lifecycle Population
During migration or cleanup, LifeCycleUtil can populate lifecycle values in bulk using existing mappings.
Key method:
LifeCycleUtil.bulkPopulate();5. Fallback to “To Be Determined”
If no valid mapping exists:
Stage → To Be Determined
Status → To Be Determined
This guarantees no CI is left blank, which is critical for CMDB health.
Key Lifecycle Tables Used
Table Purposelife_cycle_stage Defines lifecycle stages life_cycle_stage_status Defines statuses life_cycle_control Valid stage/status combinations life_cycle_mapping Legacy → CSDM mapping
Important System PropertiesProperty Name Descriptioncsdm.lifecycle.migration.activated Enables lifecycle migration csdm.lifecycle.bulk_population.active Prevents parallel bulk runs csdm.lifecycle.sync.between.ci.and.asset.activated CI–Asset sync csdm.lifecycle.excluded.class.list Excludes CI classe Scheduled Script Execution
CI Lifecycle Management – Restore Internal State Management Tables
Type: Scheduled Script Execution
Application: GlobalPurpose:
Restore lifecycle stages and statuses
Reapply lifecycle mappings
Ensure CSDM compliance
(function executeLifecycleRestore() {
var lifeCycleUtil = new global.LifeCycleUtil();
if (!lifeCycleUtil.isLifeCycleMigrationActivated()) {
gs.warn('Lifecycle migration not activated. Job aborted.');
return;
}if (lifeCycleUtil.isBulkPopulationActive()) {
gs.warn('Bulk lifecycle population already running. Job aborted.');
return;
}gs.info('Starting CI lifecycle internal state restoration');
lifeCycleUtil.bulkPopulate();
gs.info('CI lifecycle internal state restoration completed');
})();
LifeCycleUtil is the foundation of CSDM lifecycle management in ServiceNow. It enforces valid lifecycle data, synchronizes legacy and modern fields, and supports safe bulk restoration through scheduled jobs.
Using the CI Lifecycle Management – Restore Internal State Management Tables scheduled script is the recommended approach for maintaining a clean, CSDM-compliant CMDB.
If you found this article useful, please mark it as Helpful. It helps others find the content more easily 👍🙂
- 815 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
@Prathmeshda Thanks for all the info. But there is a button 'Enable Lifecycle Stages' in the mapping table and just clicking on it will transfer the existing legacy values to CSDM fields.
Can you please explain why this scheduled job should be run exclusively ?
Useful links:
Useful URLs: https://www.servicenow.com/docs/csh?topicname=csdm-life-cyle-terms.html&version=latest
https://www.servicenow.com/docs/csh?topicname=csdm-life-cycle-standard-values.html&version=latest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hello @Vijaya_Mnpram
You are correct that the 'Enable Lifecycle Stages' button is a key part of the process, but it serves a different purpose than the scheduled job.
"Enable Lifecycle Stages" Button
Purpose: To perform the initial migration of legacy status values (e.g., install_status and operational_status) to the new CSDM lifecycle fields (life_cycle_stage and life_cycle_stage_status).
Functionality: Takes all existing CIs and populates the new CSDM lifecycle fields based on predefined mappings from legacy fields.
Usage: Intended for a one-time action when first adopting the CSDM lifecycle model to align existing CMDB data.
How it Works: When clicked, ServiceNow runs a background process that goes through existing CIs, checks legacy status, and fills in new CSDM fields based on mappings.
"CI Lifecycle Management – Restore Internal State Management Tables" Scheduled Job
Purpose: For ongoing maintenance and data integrity within the CMDB.
Functionality: Acts as a corrective and synchronizing tool, regularly scanning the CMDB to identify and fix CIs that are out of sync with defined lifecycle rules.
Usage: Ensures long-term compliance and data quality in a changing CMDB environment.
Reasons for Inconsistency (Data Drift):
Manual Data Changes: Users manually changing status, ignoring intended logic.
Integrations: External tools adding data that doesn't fit lifecycle rules.
Process Changes: Updates to lifecycle mappings (e.g., changing how a legacy status maps to a CSDM stage).
Correcting Data Drift and Inconsistencies: Regularly scans to find and fix CIs where legacy and CSDM fields are out of sync or contain invalid values.
Handling New or Updated Mappings: Reassesses all CIs against current mapping rules and updates them as needed, ensuring the entire CMDB reflects new logic. The "Enable Lifecycle Stages" button is not meant for repeated use in these cases.
Ensuring CMDB Health After Major Changes: Best way to reapply and check all lifecycle states after large data imports, restores from backup, or major structural changes to the CMDB. Ensures no CI is left in a non-compliant or uncertain state.
Safety Feature: The script specifically checks if a bulk population is already in progress to avoid conflicts.
If this response proves useful, please mark it as Accept as Solution and Helpful.👍🙂
