Administración > Configuración de Módulos > Referencia > Configuración de reglas de notificación

Configuración de reglas de notificación

Puede utilizar la función getUsersToNotify del archivo de comandos change-flow.js ubicado en Módulo > Administrador > pestaña Configuración > Proceso de cambio > Archivo de comandos de flujo de cambios para definir lo siguiente:

  • Las circunstancias bajo las cuales se deben enviar las notificaciones
  • Los destinatarios de las notificaciones
  • El contenido de los mensajes de las notificaciones

Si está habilitada, de manera predeterminada la función getUsersToNotify indica a Release Control que compare cada nueva petición de cambio de un estado especificado con la versión de la petición que se recopiló anteriormente y determina si el riesgo calculado supera un umbral especificado.

function getUsersToNotify(prevChange, newChange, notificationContext) {

     return false;

/*

    var statusIsPendingApproval = (newChange.getField("status") ==

STATUS_PENDING_APPROVAL);

    

    var message = "";

    var riskStatusStr = "is ";

    

    var riskIncreased = true; // start by assuming risk increased (relevant to when the change first arrives)

    

    if (prevChange != null) {

        riskIncreased = (newChange.getField("calculated-risk") >

                  prevChange.getField("calculated-risk"));

        if (riskIncreased) {

            riskStatusStr = "has increased to ";

        }

    }

 

    var threshold = 0;

    var riskAboveThreshold = (newChange.getField("calculated-risk") > threshold);

para obtener más información sobre los cálculos de riesgos, consulte Análisis de riesgos.

Si el riesgo calculado superó el umbral especificado, la versión predeterminada de la función getUsersToNotify indica a Release Control que notifique a todos los usuarios asociados a las aplicaciones afectadas cuyo nivel de gravedad de impacto ha excedido el nivel especificado.

if (statusIsPendingApproval && riskIncreased && riskAboveThreshold) {

    var message = "The current status of the request is " +

     newChange.getField("status").name +

     " and the calculated risk level of the request " +

     riskStatusStr +

     " " +

     newChange.getField("calculated-risk") +

     ".";

// Add affected users for this change request while Severity is greater than 0 (VERY_LOW).    

// To get all affected users send -1 on: newChange.getAffectedusers()

notificationContext.addUsers(newChange.getAffectedUsersAboveSeverity (SEVERITY_LOW));

if (notificationContext.hasUsers()) {// if there are users affected by this request, then notify them to check it out

message = "This request potentially affects one or more applications for which you are registered " +

"to receive notifications.\n" + message;

Si no hay usuarios asociados a estas aplicaciones, la versión predeterminada de la función getUsersToNotify indica a Release Control que notifique al administrador.

} else {

    notificationContext.addUsersByRole("Administrator");

    message = "Change Control Management has not identified specific users that" +

     "will be notified regarding this request. " +

     "You are receiving this notification due to your role" +

     "as an Change Control Management administrator.\n" +

     message;

    }

Para una explicación de los objetos que se pueden usar en la función getUsersToNotify, consulte las clases notificationContext y GenericRFC en el archivo API_Reference.chm. (Para acceder a la Referencia de API, seleccione Inicio > Programas > Release Control 9.60 > Documentation y abra el directorio de pdf).