Use advanced conditions to define risk and impact conditions

Procedure

  1. Click New to create a new calculation.
  2. Enter a name.
  3. Select either the Risk or Impact values or both.
    This determines which field is updated by this risk calculation.
  4. Enter a description.
  5. Check the Use advanced condition box.
  6. Write the script in the Advanced condition field that appears.
    Rules are written using standard business rule syntax. The rule needs to set the global variable answer to true or false.

Example

The figure looks at the currently selected configuration item to determine whether it is a business service. If it is a Business Service then it checks a field named Business Criticality to see if the value is 1 - most critical or 2 - somewhat critical. If the condition matches, it sets 'answer = true', which will set the risk for the change request to 'High' and the impact to '1 - High'.

Another common scenario that requires scripting is determining the Business Services that will be impacted as a result of a change to one or more configuration items. A sample rule has been provided in the plugin.

In this example rule, the script uses the CIUtils() class to determine which Business Services will be impacted by your change. The servicesAffectedByCI() method is invoked, and passed the current change record. This method grabs the Configuration Item entered on the current change request then locates all associated parent and child Business Services.

A list or array of Business Services is returned, and then evaluated in the script above to determine if there are any '1 - most critical' services. If there are highly critical services then the answer will be set to true.