Using an Add rule to dynamically create asset folders

Add rule is the rule that lets you add the assets to the asset system in a specified folder. The Add rule is executed on the assets that are being imported. You can also create folders dynamically based on the common field values of the assets.

Consider the following scenario:

Assume that you want to categorize the assets of the Oracle Configured Databases based on the name of the database. The Add rule lets you create the folders dynamically based on the field value. The assets are then added to the folder that is created based on the field value.

To create asset folders dynamically with an Add rule

  1. Go to Manage > Reconciliation Rules.

  2. From the taskbar, select Create Rule.

  3. In the Create or Edit Reconciliation Rule wizard, in the Specify Rule details panel type the rule name.

  4. From the Rule type drop-down list, select Add Rule.

  5. From the Asset type drop-down list select Oracle Configured Databases.

  6. In the Save in box, browse and select the folder where you want to save the rule and click Next.

  7. In the Select Rule Conditions and Actions panel, select Add Condition.

  8. In the Add Condition dialog box, select If an asset being imported does not exist in the asset system and click OK.

  9. In the Select Rule Condition and Actions panel, select Add Action.

  10. In the Add Action dialog box, select Add an asset being imported to the specified folder.

    Click the Browse (...) icon and click New in the Select Folder dialog box.

    In the Custom Folder dialog box, select Folder based on field value.

    In the Fields list, select Database Name and click OK.

    Click OK in the Select Folder dialog box and click Next in the Specify Rule Conditions and Actions panel.

  11. Click Finish in the Summary panel.

    If you add this rule to the asset import job for the Oracle Configured Databases, different folders are created with the name of the databases and the assets are added to the proper folders.

    Go to Manage > Assets > Reconciliation Rules. Browse to the folder where you created the rule and check if the rule appears in the folder.

More Information

Using a Pre rule to set the values of the common fields

Using an Update rule to update the existing field values

Using a Post rule to mark the assets as control points