# ArchetypePolicyType (Complex Type)

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

Definition of archetype policies, such as object template, lifecycle, type display properties and so on.

Item Summary
Name | Type | Multiplicity | Description
--- | --- | --- | ---
display | container DisplayType | [0,1] | Display properties of the archetyped objects.
objectTemplateRef | reference ObjectReferenceType | [0,1] | Reference to the template.
itemConstraint | container ItemConstraintType | [0,-1] | Definition of a property constraints.
conflictResolution | container ConflictResolutionType | [0,1] | How to resolve write-write conflicts on focal objects, i.
lifecycleStateModel | container LifecycleStateModelType | [0,1] | Specification of lifecycle states and state transitions.
applicablePolicies | container ApplicablePoliciesType | [0,1] | Specification of policies that are applicable to this object type.
expressionProfile | property string | [0,1] | Specifies a profile for expression execution.
adminGuiConfiguration | container ArchetypeAdminGuiConfigurationType | [0,1] | Definition of GUI-related configuration for the archetyped objects.
assignmentHolderRelationApproach | property AssignmentRelationApproachType | [0,1] | Configures overall assignmentRelation approach for archetyped objects (assignment holders).
links | container LinkTypeDefinitionsType | [0,1] | Definitions of link types for objects having this archetype.

- ### Items

  - #### display

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Display properties of the archetyped objects.

  - #### objectTemplateRef

    Flags: RAM

    Multiplicity: [0,1]

    Reference to the template.

  - #### itemConstraint

    Flags: RAM,runtime

    Multiplicity: [0,-1]

    Definition of a property constraints.

  - #### conflictResolution

    Flags: RAM,runtime

    Multiplicity: [0,1]

    How to resolve write-write conflicts on focal objects, i.e. if two threads modify given objects at once.

  - #### lifecycleStateModel

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Specification of lifecycle states and state transitions.

  - #### applicablePolicies

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Specification of policies that are applicable to this object type. This should refer to all applicable policies, not just those that are applied. The purpose is primarily for presentation purposes, so the user interface can present choice of all policies to the user.

  - #### expressionProfile

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Specifies a profile for expression execution. The profile mostly specifies restrictions for execution of expressions and scripts. This applies to expressions in archetyped objects. Please note that no expression execution restriction means that all evaluators and scripting languages are allowed and there are no restrictions for evaluation of expressions.

    Implementation note: implementation of those restriction in midPoint 4.0 is very limited. There is no guarantee that this will work for archetypes at all. The only supported option in 4.0 is application of the restrictions to reports (ReportType) and only if it is configured in global system configuration.

  - #### adminGuiConfiguration

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Definition of GUI-related configuration for the archetyped objects. This is using principle similar to adminGuiConfiguration in system configuration.

  - #### assignmentHolderRelationApproach

    Flags: RAM,runtime,AVals:2

    Multiplicity: [0,1]

    Configures overall assignmentRelation approach for archetyped objects (assignment holders). This essentially means that it allows or disables the use of "generic" assignments for archetyped objects. If the generic assignments are allowed (open approach), the archetyped object can be a holder of any assignment that targets any assignable type with any relation. (Note: this is still subject to authorizations.) This essentially means that if this property is set to "open" then the GUI will show "assign" button that can be used to add any assignment type. If this property is set to "closed" then the GUI will not render that button. In that case only those assignments that are explicitly allowed by assignmentRelation statements are possible.

    This setting controls behavior of midPoint user interface. E.g. setting the approach to "closed" will hide the button that controls generic assignment in user's "Assignments" tab. But it will not disable similar button in the "Members" tab of the role. This setting is only about controlling uni-directional behavior of GUI. It does not constraint the entire assignment model. That would be too complex to implement (at least for now).

  - #### links

    Flags: RAM,runtime

    Multiplicity: [0,1]

    Definitions of link types for objects having this archetype. EXPERIMENTAL. UNSTABLE. DO NOT USE.