inheritancerule Command

Use the inheritancerule command to define ownership or access details that can be assigned to an object on the to or from end of a relationship when a connection is made based on the criteria defined in the rule.

For conceptual information about this command, see MQL Concepts: Inheritance Rules.

This page discusses:

Syntax

Use this syntax to issue the inheritancerule command.

[add|modify|delete|list|print] inheritancerule NAME {CLAUSE};
  • NAME is the name you assign to the inheritance rule. Rule names must be unique. For more information, see About Administrative Object Names.
  • CLAUSEs provide additional information about the inheritance rule.

Add InheritanceRule

Use this add keyword to create an inheritance rule.

Add InheritanceRule Syntax

add inheritancerule NAME [ADD_ITEM {ADD_ITEM};
  • ADD_ITEM defines the criteria for the rule and the access to apply if that criteria is met. The Add Inheritance Rule clauses are:
    operateson | from |
               | to   |
    description VALUE
    appliesto REL_TYPE {,REL_TYPE}
    RULE_ITEM {RULE_ITEM}
    [!|not] hidden
    property NAME [value STRING]
    property NAME [to ADMINTYPE NAME] [value STRING]
    • RULE_ITEM is:
      | ownership | ITEM_NAME [from SUB_ITEM {SUB_ITEM}] [to SUB_ITEM {SUB_ITEM }] [as ACCESS ]  |
      | access    |
      • SUB_ITEM is:
        | type | TYPE_NAME {,TYPE_NAME} |
               | all                    |
        | policy | POLICY_NAME {,POLICY_NAME}|
                 | all                       |

Operateson Clause

The to or from in the operateson clause indicates that the ownership or access inheritance is added to the object at that end of the relationship if the criteria of the inheritance rule are met.

add inheritancerule RULE_NAME operateson to ownership ITEM ...;

If the criteria defined by ITEM are met, the system executes this command:

mod bus TO_BO add ownership bus FROM_BO for <comment> ...;

The <comment> is constructed as follows:

enorule_<rel_pid>_<tenant_id>_<rule_id>_<rule_item_id>
  • enorule is the prefix that represents auto-generated inheritance
  • rel_pid is the physical id of the connection object
  • tenant_id is the tenant id
  • rule_id is the inheritance rule id
  • rule_item_id is the id of the specific rule item within the inheritance rule

Appliesto Clause

The appliesto clause defines the relationships that the inheritance rules applies to. If a relationship has derivatives, the inheritance rule also applies to the derivatives. You cannot use dynamic relationships to define inheritance rules.

You can define multiple inheritance rules for a relationship type. If that relationship is in a hierarchy, the inheritance rules are inherited in the same was as attributes. You cannot remove an inheritance rule from a relationship if it was inherited (and not defined explicitly on the relationship).

Ownership or Access

The RULE_ITEM clause is defined as either ownership or access and is composed of these items:

  • A unique ITEM_NAME of the rule item within the inheritance rule definition.
  • FROM SUB_ITEM {SUB_ITEM} specifies the from end criteria.
  • TO SUB_ITEM {SUB_ITEM} specifies the to end criteria.
  • ACCESS specifies the access list (such as read, write, and so on) to be inherited. For more information, see MQL Concepts: Access Privilege Definitions.

The SUB_ITEM clause specifies the business type or policy list used as the rule item criteria. For example:

add inheritancerule InheritRule ownership item1 from type type1,type2 policy all to type type1 policy policy1 as show,read;

This command defines that ownership inheritance with show, read access is added if these criteria are met:

  • FROM-end object
    • Business type is either type1 or type2
    • Any policy (all)
  • TO-end object
    • Business type must be type1
    • Policy must be policy1

The access is added to the object at the end of the connection specified by the operateson clause.

Modify InheritanceRule

After an inheritance rule is defined, you can the definition with the Modify Inheritancerule command. This command lets you add or remove defining clauses and change the value of clause arguments.

If you modify an inheritance rule, the inheritance defined for any existing business objects is not modified with the change. The ownership or access inheritance for existing business objects is only re-evaluated when the associated connection is removed or rerouted, or if you use the mod connection CONNECTION refresh-autoinheritance command. For more information, see Modify Connection.

Use this syntax to modify an inheritance rule:

modify inheritancerule NAME [MOD_ITEM {MOD_ITEM}};
  • NAME is the name of the inheritance rule to modify.
  • MOD_ITEM is the type of modification to make. You only need to specify fields to be modified.
    Modify Inheritance Rule Clause Specifies
    operateson | from |
               | to   |
    Defines which object, the one at the to or from end of the relationship, the app adds the access to if the criteria defined in the rule are met.
    name NAME The current name is changed to the new name.
    description VALUE The current description, if any, is changed to the value entered.
    add appliesto REL_TYPE {,REL_TYPE} The specified relationships are added to the appliesto clause.
    remove appliesto REL_TYPE {,REL_TYPE} The specified relationships are removed from the appliesto clause.
    RULE_MOD_ITEM {RULE_MOD_ITEM} The rule item to add or remove ownership or access.

    RULE_MOD_ITEM is the ownership or access change.

    RULE_MOD_ITEM ClausesSpecifies
    add ownership ITEM_NAME [from SUB_ITEM {SUB_ITEM}] [to SUB_ITEM {SUB_ITEM}] [as ACCESS]Adds the specified ownership or access inheritance rule item.
    add access ITEM_NAME [from SUB_ITEM {SUB_ITEM}] [to SUB_ITEM {SUB_ITEM}] [as ACCESS]
    remove ownership ITEM_NAME The specified ownership rule item is removed.
    remove access ITEM_NAMEThe specified access rule item is removed.
    ownership ITEM_NAME [from SUB_MOD_ITEM {SUB_MOD_ITEM}] [to SUB_MOD_ITEM {SUB_MOD_ITEM}] [as ACCESS]Modifies the specified ownership or access inheritance rule item.
    access ITEM_NAME [from SUB_MOD_ITEM {SUB_MOD_ITEM}] [to SUB_MOD_ITEM {SUB_MOD_ITEM}] [as ACCESS]

The SUB_MOD_ITEM clauses are defined in this table.

SUB_ITEM Clause Specifies
add type | TYPE_NAME {,TYPE_NAME} |
         | all                    |
Adds all types or the listed types to the rule item.
remove type | TYPE_NAME {,TYPE_NAME} |
            | all                    |
Removes all types or the listed types from this rule item.
add policy | POLICY_NAME {,POLICY_NAME} |
           | all                        |
Adds all policies or the listed policies to the rule item.
remove policy | POLICY_NAME {,POLICY_NAME} |
              | all                        |
Removes all policies or the listed policies from this rule item.

For more information, see MQL Concepts: Access Privilege Definitions.

Delete InheritanceRule

Use this syntax to delete an inheritance rule.

delete inheritancerule NAME;