OOB JOB "POPULATE TPM DISCOVERED TECHNOLOGIES AND LIFECYCLES" NOT WORKING AS EXPECTED

Randy TCTS
Tera Expert

ello Community,

 

We installed the Enterprise Architecture application and we are working on populating the TRM product list in the Technology Portfolio section of the application. We ran the OOB job called "Populate TPM Discovered Technologies and Lifecycles" and it appears to be not doing what it is expected to do. The job is not populating data into the sn_apm_trm_standards_product table as expected. The job is also not putting any record in the sn_apm_tpm_discovered_technology_run_log table to indicate any information the job is supposed to do.

 

We are in need of help to figure out what are we missing short of writing our custom script to move data from the source tables into the sn_apm_trm_standards_product table. Thank you for your help.

 

@tangcov 

11 REPLIES 11

Hi,

You can check if the svc_ci_assoc table is populated with data correctly against the mapped app services. The mapped app services and CI (server/computer) should be populated in the service association table for the job to pick up. You can check the  Technology Portfolio Management - Getting Started... - ServiceNow Community to understand the end to end flow.

Randy TCTS
Tera Expert

Thank you for this guidance, @sonali panda1 .  I would further asked if the content of the svc_ci_assoc table mapped app services and CI contains the same record reference, would this cause the job Populate TPM Discovered Technologies and Lifecycles" to not populate the data?

TamoghnaB
Tera Expert

Hi @Randy TCTS , 

 

As this is an OOTB job, I would say to open a HI ticket for faster resolution.

 

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

@TamoghnaB .  Thank you for your response.  I had unsuccessfully opened a few HI cases and the support team always say they are only dealing with break fix and would not even be open to having a zoom session with us to demonstrate the issue; this is also where we had several requests in the cases opened.  We tried to initially handle this through support and no success there.  We are now turning to the community in case some of our members have encountered these challenges.

Mathew Hillyard
Mega Sage

 

Hi @Randy TCTS 

That's a big old Script Include supporting the Scheduled Job - "TPMDiscoveredTechnology"!

 

Looking at the code the log record is always created unless:

  1. The scheduled job is still in a running state [sys_trigger]
  2. The Job log table [sn_apm_tpm_discovered_technology_run_log] contains a job record in a running state. If this is the case then it will restart the job.

In all other cases the next action is to create a record in the Job log table with a status of "running".

Have you checked the System Log for the message "A scheduled job is started to update the TPM Discovered Technolgies"? This should be proof that a run is starting, because it is written to the log straight after the log table message is created. This would mean that it's got at least as far as the populateASToHardware function (which is what is called by function populateAll - which is in the Scheduled Job).

 

Function populateASToHardware does the following:

  1. Gets gets the SCIA [svc_ci_assoc] records where the CI is in the Computer or its child classes
  2. For each record it then looks up the Business Application(s) related to the App Service (note: nice use of a hard-coded Sys ID for the Consumes::consumed by CI Rel Type!)
  3. It then gets details of the Computer CIs (the children of the App Services above) including the model and populates all of this into an object that is used to create records in the TPM Discovered Technology [sn_apm_tpm_discovered_technology] table, populating the Business App, App Service, Server, Hardware Model and Lifecycle data.
  4. Finally it calls TPMTechnologyLifecycle().populateLifecycles to populate lifecycle records in TPM Technology Lifecycle [sn_apm_tpm_technology_lifecycle] table, which just contains the model to lifecycle data, using the model from step 3.

So if you discover the job is running but the table has no records, then either the SCIA [svc_ci_assoc] is empty, App Services are not connected to Business Applications, Hardware or software CIs do not have related Models, or that the insert of the Job Log record is failing for some reason - line 100 of the script include - runId = runLogGr.insert(); - is not validated for a value, but it seems unlikely such an insert would fail unless the job log table had been customised.

 

I hope this helps!

Mat