Using non-listed Properties in Matching Policy in Polling and Thresholds

I have been asked at various times about using properties that are not listed in the polling and thresholds console as matching criteria.  In particular there has been interest in using Dynamic Model properties.  This is possible just not through the GUI.  To accomplish this you will need to do a bit of pre-work in the Polling and Thresholds console.  Create all your policies.  It is CRITICAL that you properly select all the Settings that you want to apply now before you add your non-standard properties to the Matching Criteria.  It is also a good idea to setup all the standard Matching Criteria properties.  YOU WILL LOSE ACCESS TO THE GUI SELECTION FOR THESE AFTER ADDING THE NON-STANDARD MATCHING CRITERIA PROPERTIES.  You will NOT lose access to update the criteria for the settings.  You will NOT be able to adjust the priorities directly from the affected groups any longer but you will be able to adjust from any other group.  Now that you have created the groups less their non-standard properties you will need to add the properties using one of the supported APIs.  Below is a pare bones example of the necessary code in ASL.  In this example I have pre-created a group named MyGroup and preassigned the settings.  I am using a DM property called MyDMField.

 

START {

    .. eol

} do {

    confObj = object("ICF_ConfigurationSelector", "S-CFG-Polling Groups/MyGroup");

    if (confObj->isNull()) {

        stop();

    }

/*

* Get the existing criteria

*/

    existingCriteria       = list();

    existingCriteria       = confObj->criteria;

    criteriaNum            = 0;

/*

* List the existing criteria

*/

    foreach criteria (existingCriteria) {

        print("existingCriteria " . criteriaNum . " property: " . criteria[0] . " pattern: " . criteria[1]);

        criteriaNum        = criteriaNum + 1;

    }

/*

* The new criteria to add or update

*/

    addCriteria            = list("MyDMField", "AMERICAS");

/*

* Check if the new criteria are an update or an addition

*/

    addCriteriaIdx         = 9999;

    criteriaNum            = 0;

    foreach criteria (existingCriteria) {

        if (criteria[0] == addCriteria[0]) {

            addCriteriaIdx = criteriaNum;

            break;

        }

        criteriaNum        = criteriaNum + 1;

    }

/*

* If this is a new criteria the addCriteriaIdx will be 9999 otherwise it will point to the existing criteria entry

*/

    if (addCriteriaIdx == 9999) {

        existingCriteria += addCriteria;

    } else {

        existingCriteria[addCriteriaIdx][1] = addCriteria[1];

    }

/*

* Replace the existing criteria list with the new criteria list

*/

    confObj->criteria      = list();

    confObj->criteria      = existingCriteria;

    newCriteria            = confObj->criteria;

/*

  * List the changed criteria

  */

    print("\n\n");

    criteriaNum            = 0;

    foreach criteria (newCriteria) {

        print("newCriteria " . criteriaNum . " property: " . criteria[0] . " pattern: " . criteria[1]);

        criteriaNum        = criteriaNum + 1;

    }

}

 

After running this script we will have updated MyGroup and have the criteria of MyDMField = "AMERICAS".  You will find in the Polling and Thresholds console when you select MyGroup the initial dialog is all gray.

 

A similar process can be applied to anywhere that selection of matching criteria are employed.

 

If there are questions let me know.