# TimeValidityPolicyConstraintType (Complex Type)

### Namespace: http://midpoint.evolveum.com/xml/ns/public/common/common-3

Supertype: AbstractPolicyConstraintType
A constraint that triggers when validity of an object, assignment, or basically any time-sensitive item (e.g. password) is about to end.

Item Summary
Name | Type | Multiplicity | Description
--- | --- | --- | ---
name | property string | [0,1] | Identifier of the constraint.
description | property string | [0,1] |
documentation | property string | [0,1] | Technical documentation for a particular object or construct.
presentation | container PolicyConstraintPresentationType | [0,1] | How should be triggering of this constraint presented, e.
item | property ItemPathType | [0,1] | The item whose validity is to be checked.
assignment | property boolean | [0,1] | If set to true, validity of assignments of the relevant object are to be checked, not items of the object itself.
activateOn | property duration | [0,1] | When will this policy constraint activate (trigger)? If not specified, activation will occur on the moment of validity change.
deactivateOn | property duration | [0,1] | When will be this policy constraint deactivated? If not specified, it will be active forever.

- ### Items

  - #### name

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Identifier of the constraint. It is used when midPoint needs to refer to a specific constraint, e.g. in order to record exception. This element is formally specified as optional, mostly due to the compatibility reasons. But it has to be provided in order for some functionality to work correctly.

  - #### description

    Flags: RAM,runtime

    Multiplicity: [0,1]

  - #### documentation

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Technical documentation for a particular object or construct.

    The purpose of this element is to document system configuration and behavior. The documentation will not be presented to end users. In fact, it will probably not be presented at all in midPoint user interface. This documentation element is supposed to be a part of the technical documentation of midPoint deployment. The tools than generate deployment configuration will look for these elements and combine them to compiled documentation document.

    AsciiDoc formatting is assumed for this element. Any leading or trailing whitespace is skipped. Indentation equivalent to he indentation of the first non-blank line of text is also skipped.

  - #### presentation

    Flags: RAM,runtime

    Multiplicity: [0,1]

    How should be triggering of this constraint presented, e.g. in enforcement messages, in approvals, in certification, in notifications, etc.

  - #### item

    Flags: RAM,runtime

    Multiplicity: [0,1]

    The item whose validity is to be checked. If not specified, activation/validTo is assumed.

  - #### assignment

    Flags: RAM,runtime

    Multiplicity: [0,1]

    If set to true, validity of assignments of the relevant object are to be checked, not items of the object itself. So, for example, if you want to send notifications before validity of assignments to roles A, B, C expire, you'd need to attach a policy rule with this constraint having assignment=true to roles A, B, and C.

  - #### activateOn

    Flags: RAM,runtime

    Multiplicity: [0,1]

    When will this policy constraint activate (trigger)? If not specified, activation will occur on the moment of validity change. Specify negative durations if you need to activate the trigger before that moment; and positive ones if the trigger should be activated after that.

  - #### deactivateOn

    Flags: RAM,runtime

    Multiplicity: [0,1]

    When will be this policy constraint deactivated? If not specified, it will be active forever. Specify negative durations if you need to activate the trigger before the moment of validity change; and positive ones is the trigger should be deactivated after that. If not specified, the trigger will be active forever (TODO ok? or only until validTo occurs?)