# 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
--- | --- | --- | ---
$itemDefinition.Name.LocalPart | property string | [0,1] | Identifier of the constraint.
$itemDefinition.Name.LocalPart | property string | [0,1] |
$itemDefinition.Name.LocalPart | container PolicyConstraintPresentationType | [0,1] | How should be triggering of this constraint presented, e.
$itemDefinition.Name.LocalPart | property ItemPathType | [0,1] | The item whose validity is to be checked.
$itemDefinition.Name.LocalPart | 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.
$itemDefinition.Name.LocalPart | property duration | [0,1] | When will this policy constraint activate (trigger)? If not specified, activation will occur on the moment of validity change.
$itemDefinition.Name.LocalPart | property duration | [0,1] | When will be this policy constraint deactivated? If not specified, it will be active forever.

- ### Items

  - #### $itemDefinition.Name.LocalPart

    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.

  - #### $itemDefinition.Name.LocalPart

    Flags: RAM,runtime

    Multiplicity: [0,1]

  - #### $itemDefinition.Name.LocalPart

    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.

  - #### $itemDefinition.Name.LocalPart

    Flags: RAM,runtime

    Multiplicity: [0,1]

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

  - #### $itemDefinition.Name.LocalPart

    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.

  - #### $itemDefinition.Name.LocalPart

    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.

  - #### $itemDefinition.Name.LocalPart

    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?)