Configuring Rules

Objective

After completing this lesson, you will be able to configure rules in SAP Asset Performance Management, ensuring that they align with specific organizational requirements and objectives

Configuration of Rules

Key Terms, Used in This Lesson:

APM Rules Engine: The component within SAP APM that allows users to set up conditions for monitoring and alerting based on asset data.

Calculation Rule: A type of rule that uses data to produce a new calculated indicator.

Streaming Rule: A rule that triggers an alert or notification based on real-time data updates.

Scheduled Rule: A rule that triggers an alert or notification based on a predefined schedule, independent of data updates.

Aggregation Rule: A rule that summarizes data from a single indicator of a child object to a parent-level indicator.

Dynamic Rules: Rules that are applied to technical objects based on filter criteria, which automatically include new objects that fit these criteria.

Static Rules: Rules that are applied to specific, selected technical objects and do not automatically update when new objects are added.

Data Set: The collection of data, including indicators, characteristics, or attributes, that a rule will use to evaluate conditions.

If Else Conditions: The logical conditions set within a rule to determine when and how it should execute.

Aggregation Method: The specific method used in an aggregation rule to compile data from the child to the parent object.

Business Rules Language: The language used within SAP APM to create expressions and formulas for rules.

Release of Rules: The process of finalizing and activating a rule within SAP APM for it to take effect.

Business Scenario: Configuration of Rules

In this lesson, Jessica will discover how to monitor asset health by configuring rules, effectively using alerts, configuring failure curve analytics, and managing inspections.

Lesson Overview: Configuration of Rules

In this lesson we will be walking through the capabilities that the APM rules engine provides for simple and more complex condition monitoring and alerting scenarios. The rules engine enables users to set up four types of rules: streaming, aggregation, scheduled and calculation.

The below table outlines the different inputs and outputs for each of the rules and what outputs the various types may be used to enable.

Different Inputs and Outputs for Each of the Rules

Rule TypeInputOutput
Calculation RuleTechnical object Indicators (time series data or measuring points), characteristics, or attributesCalculated Indicator
Streaming RuleTechnical object Indicators (time series data or measuring points), characteristics, or attributesAlert or Notification
Scheduled RuleTechnical object Indicators (time series data or measuring points), characteristics, or attributesAlert or Notification
Aggregation RuleSingle child object indicatorAggregated Indicator at parent level

Note: Calculation, Streaming, and Aggregation rules will all execute on data updates so any input data that is defined when it receives an updated value will cause the rule to evaluate. Scheduled rules will only evaluate on the defined schedule.

For all rule types the basic setup follows the same flow. First you will configure the data set for the rule. This is where you will select which objects the rule applies to and what data underneath those objects will be used in the proceeding conditions. Second, in addition to the input data in the data set setup you will also define your output. As displayed in the table above for calculation rules you will define an output indicator, for streaming and scheduled rules you will select either an alert or notification as the output and for aggregations you will define what your output indicator at the parent level will be. After the data set is set up and saved you will be brought to the configuration tab of the rule where you will set up the if else conditions for your rule. In this tutorial we will walk through the setup of a rule and the various options you have during that process.

Step 1 - Defining the Data Set

Video Summary

Learn how to create a rule in SAP Asset Performance Management. Follow along with Ryan as he walks you through the process of identifying the alert type, configuring the rule, and evaluating its effectiveness.

Explore Technical Objects section for the technical object Test Machine PB (ID: 10002574) within the SAP Asset Performance Management System. The interface includes options to create new indicators, add new values, configure existing ones, and delete. It also provides tools for filtering and viewing the indicators in different formats. The page indicates the last refresh time at 10:28 PM. This screen allows users to monitor and manage various indicators associated with the Test Machine PB, providing a comprehensive overview of its measurement points and associated data.

For this lesson we will be using the above technical object with the listed indicators. We will be setting up a calculation rule whose output will be a calculated change in pressure indicator displayed above but will be calling out how the other rule types vary and show examples where they do. To start the rule creation you first need to go to the rules tile and select create. Here you will be prompted to select the rule type and enter a rule name. We will choose a calculation rule and the rule name that we are using here is ME_PUMP_CALC_DEMO. Once you choose Create you will be brought to the data set creation screen which looks like the below

ME_PUMP_CALC_DEMO rule within the Configuration tab of the SAP Asset Performance Management System. This screen allows users to configure and manage the technical objects, indicators, characteristics, and attributes related to the ME_PUMP_CALC_DEMO rule. The options to view details, edit, and assign indicate the flexibility in managing each component of the rule.

The first step in creating a data set is defining the technical objects that the rule will apply to. This can be done in two ways - either statically or dynamically. Note: Dynamic rules select technical objects based on filter criteria whereas static rules you select specific objects to apply the rule to. The benefit of a dynamic rule is that as new objects are created that fit the filter criteria the rule is automatically applied. Static rules will only apply to the specific objects that are selected. One thing to look out for in creating dynamic rules is that any indicator you wish to use in the set needs to be setup the same for all objects that match the filter criteria. For example, if you want a rule to apply to all objects in the same class those objects need to have identical indicators created for them for them to be available in the input indicators selection. They need to be the same in backing characteristic and position to be considered identical.

Select Technical Objects dialog within the SAP Asset Performance Management System. This dialog is used to filter and select technical objects for a dynamic data set.This screen provides a comprehensive set of filters to narrow down and select technical objects for a dynamic data set within the system, allowing for precise configuration and management.

Above is a view of all the filters that are available for dynamic rule assignment. For our rule we will choose the select specific technical objects switch and choose our individual object to narrow our rule to only run on the equipment 10002574 which is pictured above.

Once the object is selected you then can define the other input data that you need to be available for the conditions in the rule. Here we will select just one indicator which is the pressure indicator underneath our object. Below we will have screenshots of each of the different data sets and options that they provide.

Calculation Rules

Rule configuration interface within the SAP Asset Performance Management System. This screen is used to set up and manage data sets for a rule. This screen provides a configuration interface for setting up a rule by defining its input and output components, including technical objects, indicators, characteristics, and attributes. The assign buttons facilitate the addition of specific items to each category. The warning message at the top advises users to save the rule to synchronize changes with the rule editor.

Aggregation Rule

Technical objects interface displaying the Input and Output indicators.

In an aggregation rule you only have one input indicator as a selection. This is because aggregation rules are meant to aggregate an individual child object indicator up to the parent which is the output.

Scheduled Rule

Technical objects interface displaying the Input indicators such as Technical Objects, Indicators, Characteristics, Attributes. Output options such as Alert and Notification.

Scheduled Rules are similar to aggregations however your output is a switch where you either can raise an alert, a notification, or both.

Streaming Rule

Technical objects interface displaying the Input indicators such as Technical Objects, Indicators, Characteristics, Attributes. Output options such as Alert and Notification.

Streaming rule data sets are the same as scheduled with the only difference being that scheduled rules run on a schedule while streaming rules will run whenever data is updated

For all rules except for scheduled rules it is important to note that whenever data values are updated for the inputs in the data set the rule will evaluate. Ie. You can add additional indicators and characteristics that may not be used in conditions to force a rule to run again.

Once the input and outputs are defined for your data set you are then ready to move on to defining the rule conditions.

Step 2 - Defining Rule Conditions

After you save the data set you will be brought to the configuration tab of the rule. In this tab you can define your "if-else" conditions for the given rule. In calculation rules the "if" condition is the qualifier and the "then" is the calculation that will run to populate your defined output indicator. In scheduled and streaming rules the if condition is your condition to raise either the alert or notification that is defined in the then condition. For aggregation rules however there are no if then conditions you simply select the aggregation method which you wish to use to aggregate the data up from the child to the parent object. Below is a screenshot of the if then condition that we are using to calculate a change in pressure.

Rule Editor tab within the SAP Asset Performance Management System, used for defining logic for a rule. This screen allows users to define the logical conditions and actions for a rule, using a text-based interface to specify the If, Then, Else If, and Else parts of the rule. The Add Else If and Add Else buttons provide options to extend the rule logic with additional conditions and actions.

Here we check first if the latest pressure value is not null and if we have a value we use that and the previous pressure reading to calculate the latest change in value. Note: The rules engine uses SAP's business rules language to create expressions. All formulas available in that language can be used in the rules engine except for the aggregation functions which will not work. For all indicators you have access to the Latest Previous and Oldest as well as their timestamps denoted by a TS prefix however for characteristics and attributes you only have access to the latest values.

You are able to add additional "else if" and "else" conditions as needed in calculation streaming and scheduled rules but as noted before aggregation rules you are only able to select an aggregation method and that is it. Below are screenshots from the other three rule types.

Aggregation

Rule Editor Reopened interface displaying , Aggregation Method Average.

Scheduled

Rule Editor Conditions with an alert stating mandatory fields, Text Rule with data input fields to be completed as an 'if this- then this' configuration.

At the bottom of the scheduled rule configuration is where you define the schedule which the rule will execute on.

Rule Editor displaying Schedule interface with options to establish Frequency such as Hour, Start Time, End Time and Execution Mode.

Streaming:

Rule Editor Conditions with an alert stating mandatory fields, Text Rule with data input fields to be completed as an 'if this- then this' configuration adding in 'else if ' and 'else'.

Note

The scheduled rule above shows the options that you have for notification creation fields and the streaming rule shows the alert type field. The outputs for either though are interchangeable so both rules can raise either outputs.

Step 3 Releasing the rule:

Releasing the rule is as simple as saving the configuration tab and choosing the Release button to activate the rule. Once a rule is released it can not be edited until it is reopened which will in turn de-activate the rule. For dynamic data set rules if the rule is released and a new object is created which fits the filter criteria the rule will be inherited and execute on that object when the relevant data is ingested without any user intervention needed. For static rules if you wish to add additional objects you will need to reopen the rule and edit the data set so that the new objects can be included. Note that when editing an already released rule and adding objects you will need to reselect the input indicators characteristics and attributes for the rule. If an indicator is missed and the data set is saved then you may need to rebuild the conditions in the configuration tab to account for the missing input data piece.

Finally

The rules engine can be a very powerful tool for enabling condition monitoring scenarios. While there is still additional functionality to come regarding more outputs as well as more functions like time series aggregation functions there still is a lot of capability to enable many of the common scenarios that users may need. With a little creativity the rules engine can be manipulated to solve various use cases both for calculations on technical objects as well as alerting and notification scenarios.

Additional Resources

Image of a laptop displaying the application SAP help page Manage Rules.

Manage Rules

Personal Reflection

Personal Reflection.

Recall a time when you were tasked with setting up a system or process that had to react to changes effectively.

How did you determine the criteria for these reactions and ensure they were relevant and timely?

Expert Response to Personal Reflection Question

Expert Response.

When I set up systems that need to respond dynamically to changes, I start by defining the objectives clearly-what outcomes are we seeking? This is akin to configuring SAP APM rules, where the intent of each rule must align with the broader goals of asset performance and maintenance. The criteria for triggering responses, much like setting conditions for APM rules, are based on a deep understanding of the system's behavior and the desired performance thresholds.

In SAP APM, a streaming rule is immediate and reactionary, suitable for scenarios requiring quick responses, just as certain situations in life or business necessitate swift action. Scheduled rules, on the other hand, reflect regular check-ins, paralleling routine reviews in a business process to ensure ongoing compliance and performance.

The complexity of calculation rules in SAP APM, which produce new insights from existing data, reminds me of the analytical part of system setup, where data is synthesized into actionable information. Just as in APM, where these rules are based on precise formulas, in my own processes, I ensure that the logic behind each decision point is robust and considers all relevant variables.

This reflection shows that whether configuring rules in SAP APM or setting up other responsive systems, the key lies in understanding the operational context and defining clear, actionable criteria that serve the system's purpose. It's about anticipating needs and programming the system to respond appropriately, ensuring alignment with strategic objectives at every step.

Conclusion

Overview:

  • This lesson focuses on the capabilities of the APM rules engine for condition monitoring and alerting scenarios.
  • Four types of rules: Calculation, Streaming, Scheduled, and Aggregation.
  • Calculation rules use technical object indicators for time series data, characteristics, or attributes to calculate a new indicator.
  • Streaming and Scheduled rules utilize technical object indicators for alert or notification outputs.
  • Aggregation rules aggregate a single child object indicator to the parent level.

Basic Setup for All Rule Types:

  1. Configure the data set: Select objects, define input data, and specify the output.
  2. Move to the configuration tab to set up if-else conditions for the rule.

Step 1 - Defining the Data Set:

  • Choose between dynamic and static rule assignment.
  • Dynamic rules apply automatically to objects matching filter criteria.
  • Static rules apply only to selected objects.
  • Ensure indicators are set up identically for dynamic rules.

Calculation Rule Data Set: Choose technical objects and select indicators for conditions.

Aggregation Rule Data Set: Select a single input indicator for aggregation to the parent level.

Scheduled Rule Data Set: Similar to aggregations but with options to raise an alert, a notification, or both.

Streaming Rule Data Set: Similar to scheduled rules but runs whenever data is updated.

Step 2 - Defining Rule Conditions:

  • Calculation rules: Use SAP's business rules language to create expressions for qualifiers and calculations.
  • Scheduled and Streaming rules: Define conditions to trigger alerts or notifications.
  • Aggregation rules: Select an aggregation method with no if-then conditions.

Step 3 - Releasing the Rule:

  • Save configuration, choose the Release button to activate the rule.
  • Released rules cannot be edited until reopened, which deactivates the rule.
  • Dynamic rules inherit new objects fitting filter criteria automatically.
  • Static rules require reopening and editing for additional objects.

Log in to track your progress & complete quizzes