Integration script for Black Duck Application List Integration.

GudiyaYadav
Tera Contributor

On the scheduled job ‘ Blackduck Applicaton List Integration: I am trying to add script to only import the project and project versions that are in the ‘Released’ SDLC Status.

 

It will helpful for me if anyone explain how the process of this integration for fetching the versions works and how can i compare the SDLC status to restrict the versions not to be added in Discovered Applications[sn_vul_release] table?

 

Thanks in advance!!

 

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@GudiyaYadav 

we are not aware what that job does and what's your actual business requirement.

Unless you share that and the relevant scripts can't help

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Community Alums
Not applicable

Hi @GudiyaYadav 

As far I know, if we use the scheduled job for the Blackduck Application List Integration. That script for the scheduled job is likely responsible for calling the Blackduck API, processing the response, and inserting the data into ServiceNow. Just find out the scheduled job make below modification in condition of your code.

// script for considering `projectVersion` is an object representing a project version fetched from Blackduck
var sdlcStatus = projectVersion.sdlc_status; 

if (sdlcStatus === 'Released') {
var discoveredApp = new GlideRecord('sn_vul_release');
discoveredApp.initialize();
discoveredApp.application = projectVersion.application; 
discoveredApp.version = projectVersion.version; 
discoveredApp.sdlc_status = projectVersion.sdlc_status; 
discoveredApp.insert();
} else {
gs.info(projectVersion.version + '  is not in "Released" status.');
}