Name

global.OpsStatusFilter

Description

List Operational Statuses associated with a specific CI type and action.

Script

var OpsStatusFilter = Class.create();
OpsStatusFilter.prototype = {
  initialize: function(ciType) {
  	this.ciType = ciType;
  },
  
  by: function (actionName) {
  	var gr = new GlideRecord('statemgmt_not_allow_actions');
  	gr.addQuery('ci_type', this.ciType);
  	gr.addQuery('not_allowed_action.name', actionName);
  	gr.query();
  	var ops = [];
  	while (gr.next()) {
  		ops.push(gr.operational_state + '');
  	}
  	
  	return ops;
  },
  
  type: 'OpsStatusFilter'
};

Sys ID

907b019d9f502200d3921a1cf67fcf58

Offical Documentation

Official Docs: