Add Policy Syntax

Policies are defined using the Add Policy command.

add policy NAME [ITEM {ITEM}];
  • ITEM defines information such as the types of objects governed by the policy, the types of formats permitted by the policy, the labeling sequence for revisions, the storage location for files governed by the policy, and the states and conditions that make up an object’s lifecycle.

The Add Policy clauses are:

description VALUE
icon FILENAME
type | TYPE_NAME {,TYPE_NAME} |
     | all                    |
format | FORMAT_NAME {,FORMAT_NAME} |
       | all                        |
defaultformat FORMAT_NAME
[!|not]enforce
minorsequence REVISION_SEQUENCE
majorsequence REVISION_SEQUENCE
delimiter DELIMITER
allstate [ALLSTATE_ITEM {,ALLSTATE_ITEM}]
state STATE_NAME [STATE_ITEM {,STATE_ITEM}]
store STORE_NAME
[!|not] hidden
property NAME [to ADMINTYPE NAME] [value STRING]
history STRING

  • ALLSTATE_ITEM is:
    ACCESS_USER ACCESS_ITEM {,ACCESS_ITEM} [{USER_ITEM}]
    rule RULENAME [ all | MAPPED_ACCESS_USER {MAPPED_ACCESS_USER}]
    • ACCESS_USER is:
      | [revoke] [login] public [key STRING]         |
      | [revoke] [login] owner [key STRING]          |
      | [revoke] [login] user USER_NAME [key STRING] |
    • ACCESS_ITEM is:
      | all                 |
      | none                |
      | [not]changename     |
      | [not]changeowner    |
      | [not]changepolicy   |
      | [not]changesov      |
      | [not]changetype     |
      | [not]changevault    |
      | [not]checkin        |
      | [not]checkout       |
      | [not]create         |
      | [not]grant          |
      | [not]delete         |
      | [not]demote         |
      | [not]disable        |
      | [not]enable         |
      | [not]execute        |
      | [not]freeze         |
      | [not]fromconnect    |
      | [not]fromdisconnect |
      | [not]lock           |
      | [not]majorrevise    |
      | [not]modify         |
      | [not]modifyform     |
      | [not]override       |
      | [not]promote        |
      | [not]read           |
      | [not]reserve        |
      | [not]unreserve      |
      | [not]revoke         |
      | [not]revise         |
      | [not]schedule       |
      | [not]show           |
      | [not]thaw           |
      | [not]toconnect      |
      | [not]todisconnect   |
      | [not]unlock         |
      | [not]viewform       |
      | [not]addinterface   |
      | [not]removeinterface|
    • USER_ITEM is:
      [any | single | ancestor | descendant] organization
      [any | single | ancestor | descendant] project
      [any | context] owner
      [any | no | context | inclusive] reserve
      [any | public | protected | private | notprivate | ppp] maturity
      [filter | localfilter] EXPR
      [branch STATE_NAME]
    • MAPPED_ACCESS_USER is:
      | ruleuser public [ all | rulekey STRING [ statekey STRING]                      |
      | ruleuser owner rulekey STRING [statekey STRING ]                               |
      | ruleuser USER_NAME [ all | rulekey STRING ] [stateuser NAME] [statekey STRING ]|
  • STATE_ITEM is:
    [!|not]enforcereserveaccess
    action PROGRAM
    check PROGRAM
    icon FILENAME
    ACCESS_USER ACCESS_ITEM {,ACCESS_ITEM} [{USER_ITEM}]
    rule RULENAME [ all | MAPPED_ACCESS_USER {MAPPED_ACCESS_USER}]
    notify | USER_NAME {,USER_NAME} message VALUE |
           | signer message VALUE                 |
    promote | [true] |
            | false |
    minorrevision | [true] |
                  | false  |
    majorrevision | [true] |
                 | false |
    checkouthistory | [true] |
                    | false  |
    published | [true] |
              | false  |
    route USER_NAME message VALUE
    block STATE_NAME
    unblock STATE_NAME
    signature SIGN_NAME [SIGNATURE_ITEM {,SIGNATURE_ITEM}]
    version | [true] |
            | false  |
    stateproperty NAME [to ADMIN] [value STRING]
    TRIGGER PROG_NAME [input ARG_STRING]
    [!|not] splitchangetypeinterfaceaccess
  • SIGNATURE_ITEM is:
    approve USER_NAME {,USER_NAME}
    ignore USER_NAME {,USER_NAME}
    reject USER_NAME {,USER_NAME}
    branch STATE_NAME
    filter EXPR
  • TRIGGER is:
    trigger EVENT_TYPE | action   |
                       | check    |
                       | override |
  • EVENT_TYPE is:
    approve
    demote
    disable
    enable
    ignore
    override
    promote
    reject
    schedule
    unsign

Some of the clauses are required and some are optional.