Rule Referencing in Desired Configuration Monitoring Solution

Rule-referencing is one of the most helpful features in the DCM Solution which can help you frame complex queries! This post explains about the rule referencing feature in the DCM Authoring tool.

 

Well, as the name suggests, it basically means referencing another rule from a rule and so on. There is no limit to the no of levels of referencing you can have. Also, the rules can appear under any data source / setting pairs and need not be under the same pair. Let us go by an example. Let’s say we want to generate a string by doing the following:

  1. Get the value of a setting from a Registry
  2. Replace the character A with B
  3. convert the string to lower case
  4. Do a compliance check on the obtained value

 

This is how you would do it:

  1. Create a data source / setting pair
  2. Create a passive rule (R1) to get the value of the setting. The query expression would be $. .
  3. Create a passive rule (R2) to replace the occurrences of the character A with character B. The query expression would be replace($R1, ‘A’, ‘B’) .
  4. Create a passive rule (R3) to convert the case of the string. The query expression would be lower-case($R2) .
  5. Create an active rule (R4) to do the real compliance check.

 

All we have done here is to reference other rules while creating the query expressions for rules. With this feature, you should be able to reach any level of complexity. However, care should be taken so as not to cause cyclic references between the rules. The UI is intelligent enough not to create cyclic dependencies. However, while creating rules using the Advanced Query Expression section, you should avoid creating cyclic references. Thanks!