Working with Constraints

Constraints enable you to enforce specific data rules (such as name uniqueness) across node types and dimensions in an application.

Constraints differ from custom validations in that they check for conditions across a set of nodes, whereas custom validations check for conditions at the node level. For example, a custom validation can check for a condition on a node or its parent, but constraints enable you to check that condition across a set of nodes at the dimension or application level.

Considerations

  • You must have the Owner or Metadata Manager permission on an application in order to create any type of constraint in that application.
  • Constraints can be added to enforce property value uniqueness for an application, a dimension, or across specific node types. When enabled, a constraint will check that a property that you specify has unique values across either all of the bound node types in a specified application or dimension, or across any node types (bound or unbound) that you specify.

    Note:

    • Planning, Planning Modules, and Financial Consolidation and Close applications in Oracle Enterprise Data Management Cloud already have application-specific validations that check for node name uniqueness across node types at the application level. You do not need to create a constraint to enforce this data rule for those application types.
    • Oracle Financials Cloud General Ledger applications in Oracle Enterprise Data Management Cloud already have application-specific validations that check for node name uniqueness across node types at the dimension level. You can add a constraint at the application level if you want to apply the node name uniqueness rule across segment value sets.
  • You can create constraints for a property that meets these criteria:
    • The property must be a node level property. You cannot create a constraint on a relationship level property.
    • The property data type must be a string, numeric string, or a sequence data type.
    • The property value cannot be inherited, and it cannot have a Derived or Derived and Stored default value.

      If you have added a constraint for a property, you cannot change that property to have an inherited value or a Derived or Derived and Stored default value.

  • You can add constraints for up to four unique properties per application. However, you can add more than one constraint on a single property. For example, you can have an application on the Alias:Default property, and then create a separate node type constraint at the node for Alias:Default that checks against your unbound node types. This still counts as one property towards the application limit of four.

    Note:

    If you have created an application constraint for a specific property, you do not need to create a separate dimension constraint for that same property in that application. Application constraints already check for property value uniqueness across all bound dimensions in that application.

Creating, Editing, and Deleting a Constraint

To create a constraint:

  1. Inspect the application that you want to create a constraint for.
  2. On the Constraints tab, click Create, and then perform an action:
    • To check uniqueness of a property for all nodes within all bound node types in an application:
      1. Select Application Bound Uniqueness.
      2. Enter a name and description.
      3. From Properties, select a property for the constraint. Only node level properties with the string data type whose default values are not inherited or derived are displayed.
      4. Select whether to enable the constraint or not. By default, the constraint is enabled.
    • To check uniqueness of a property for all nodes within all bound node types in a dimension:
      1. Select Dimension Bound Uniqueness.
      2. From the dimension drop down menu, select a dimension. The drop down menu displays bound dimensions only.
      3. Enter a name and description.
      4. From Properties, select a property for the constraint. Only node level properties with the string data type whose default values are not inherited or derived are displayed.
      5. Select whether to enable the constraint or not. By default, the constraint is enabled.
    • To check uniqueness of a property for all nodes within selected node types in an application:
      1. Select Node Type Uniqueness.
      2. In Node Types, select a node type to add it to the constraint. You can select multiple node types for the constraint, and you can select bound and unbound node types. Click the X to remove a selected node type from the constraint.
      3. Enter a name and description.
      4. From Properties, select a property for the constraint. Only node level properties for the node types that you selected that have the string data type and whose default values are not inherited or derived are displayed.
      5. Select whether to enable the constraint or not. By default, the constraint is enabled.
  3. Click Save.

After you create a constraint, click Edit to edit its name and description or to enable or disable it. You cannot change the type of a constraint (for example, from application to dimension type) or the dimension that a constraint applies to after it has been saved .

To delete a constraint, click X on the constraint to be deleted. You must not be in edit mode to delete a constraint.