Scheduled job "Service Mapping - sync svc_ci_assoc" stops running when there's any invalid svc_layer or svc_container, as a result svc_ci_assoc list is not up to dateDescriptionWhen we have an application service (cmdb_ci_service_discovered) that has layer field pointing to a non-existing svc_layer,or if we have a svc_layer that points to a non-existing svc_container, then the Scheduled job "Service Mapping - sync svc_ci_assoc" stops working, and thus svc_ci_assoc table stops getting automatic / regular updates. To confirm the issue, run below script: var manager = new SNC.SvcAssocPopulationManager();manager.fullSync(); If above script returns error, similar to example below, then this PRB is hit. (52)ExceptionHandler - exception at service SvcAssocPopulationManager: com.snc.cmdb.CmdbRuntimeException: Can't find ServiceContainer 'xxx'at com.snc.cmdb.service.modeling.impl.ServiceContainerImpl.getRecord(ServiceContainerImpl.java:299)at com.snc.cmdb.service.modeling.impl.ServiceContainerImpl.<init>(ServiceContainerImpl.java:42) Steps to Reproduce > Let's say there are 100 Application service. Many of them have entry point changed. If we manually click on "list CIs", it will to referesh svc_ci_assoc.> Now let's try to break an Application Service (e.g. delete the svc_layer associated with the application service, or delete the svc_container)> Now the "Service Mapping - sync svc_ci_assoc" is stopped working.WorkaroundThe entire implementation will be redesigned in Rome, which will fix the issue. Prior to Rome release, if you would like to quickly fix the Services with incorrect svc_ci_assoc, please open the Application Service, under "Additional Info", click on "List CIs". === If you would like to fix the scheduled job so it can automatically refresh svc_ci_assoc every day, current workaround is to find all the broken application services, then use "Sync with Service Model" link under Additional info to fix them. To find out the broken Application Services, you may use scripts below. Note: the script can also be modified to fix all broken application services automatically. Script 1 To find all the invalid svc_layer://---------------------------------------------- var gr = new GlideRecord('cmdb_ci_service_discovered');gr.query();var count = 0; while(gr.next()){if(gr.layer != null && gr.layer !="") {var grLayer = new GlideRecord('svc_layer');grLayer.get(gr.layer); if(grLayer.container == null || grLayer.container =="") {gs.info(gr.name); var utils = new ServiceMappingUtils();gs.log("*** Synching Business Service id=" + gr.sys_id + " with Service Model ***");//utils.resetModel(gr); //uncomment this line to automatically fix the Application Service count ++ ;}}}gs.info(count); //---------------------------------------------- Script 2 Reporting application service with layers pointing to wrong svc_container://---------------------------------------------- var gr = new GlideRecord('svc_layer');gr.query();var serviceCount=0; while(gr.next()){ if(gr.container != null && gr.container !="") {var grContainer = new GlideRecord('svc_container');grContainer.get(gr.container);if(grContainer.name == null || grContainer.name =="") { //try to find the application service namevar grService = new GlideRecord('cmdb_ci_service_discovered');grService.addQuery('layer',gr.sys_id);grService.query();while(grService.next()){gs.info('Service Name: '+grService.name);serviceCount++;var utils = new ServiceMappingUtils();gs.log("*** Synching Business Service id=" + grService.sys_id + " with Service Model ***");//utils.resetModel(grService); //uncomment this line to automatically fix the Application Service }}}}gs.info('Application Service with issue: '+serviceCount); //---------------------------------------------- Related Problem: PRB1480958