Have an indication on the business app that a Retire request was submitted?

MEBoatman
Mega Guru

We are using the OOB Register and Retire requests. For us, Retire requests take some time. We have a whole list of tasks that must be completed and invariably our "undertaker" process gets prioritized low...leading to some retire requests taking a LONG time to complete. Currently, there is no indication on the Business App that it is in the process of being retired. I have taken to manually changing Operational Status to Non-Operational and adding something to the Description like "RETIRE REQUEST IN PROGRESS." That way when we do things like data certification or health assessment or when people pull a list of business apps they can ignore the ones that are being retired. I have contemplated adding a field to Business App - something like "Retire Request in Progress" that gets set when the retire request is submitted and then could be used to exclude those apps. How are others handling this? 

2 REPLIES 2

lpruit2
Mega Sage

Greetings @MEBoatman. I wonder if others can share if they've ever used the CMDB Query Builder for a no-code approach to identifying these records. If this is not achievable, the thought that comes to mind is the build the list of records (minus those to be excluded) via a scripted report.

To do this, you can create a new function within a Script Include that uses a GlideRecord query to build the desired list of Business Applications you wish to display. I'll include some sample code and screenshots below to get the conversation started. As always, interested in what others have to share and if there are better solutions. 

 

Note: This requires that the Business App Request records for the Retire Business Application Requests are populating the Business Application value in the Configuration Item (cmdb_ci) field. In my PDI, this is NOT out of the box behavior so would need to be configured as such if you are not already doing this. 

 

Script Include: 

lpruit2_0-1769265555986.png

 

var BusAppFilterUtils = Class.create();
BusAppFilterUtils.prototype = {
    initialize: function() {},

    removeRetireRequests: function() {
        var exclude_list = [];

        // Query the Business Application Request table
        // State is one of - Pending, Open, Work In Progress
        // Short Description - Request to retire business application
        // ENSURE YOU ARE POPULATING THE BUSINESS APPLICATION BEING IMPACTED IN THE CMDB_CI FIELD!!!!
        var retire_request = new GlideRecord('business_app_request');
        retire_request.addEncodedQuery('stateIN-5,1,2^short_descriptionSTARTSWITHRequest to retire business application');
        retire_request.query();

        while (retire_request.next()) {
            exclude_list.push(retire_request.cmdb_ci.toString());
        }

		//Return the final query that is excluding those Business Applications with open BAR 
        return exclude_list;
    },

    type: 'BusAppFilterUtils'
};

 

Then, back on the report screen, you start to use the Condition Builder and call this function within the text field. Since you can't see the full text within the screenshot for the 'Sys ID - is not' field, I'll include the code here: javascript: new global.BusAppFilterUtils().removeRetireRequests();

 

lpruit2_1-1769265652075.png

 

Mathew Hillyard
Giga Sage

Hi @MEBoatman 

Use the Planned disposition field. It's what it's designed for - to set the intent for what you want to do with the Business Application. This means you "plan" to retire the Business App. Set it to Retire when the retire request is opened. Then once it is actually retired you can track by Install status = Retired.

 

If you want to review the retire request, then add the Business Application Request related list to the Business Application form and filter on Short Description starts with "Request to retire business application" - assuming you're using the OOTB Retire a Business Application catalog item. If you're in EA Workspace you'll can configure in the EA Workspace view of the form.

 

I hope this helps!

Mat