<!--
  ~ Copyright (c) 2019-2025 Evolveum and contributors
  ~
  ~ This work is dual-licensed under the Apache License 2.0
  ~ and European Union Public License. See LICENSE file for details.
  -->

<!--
  Activate view for this archetype in adminGuiConfiguration like this:

  <adminGuiConfiguration>
    <objectCollectionViews>
        <objectCollectionView>
            <identifier>business-roles</identifier>
            <type>RoleType</type>
            <collection>
                <collectionRef oid="00000000-0000-0000-0000-000000000321" type="ArchetypeType"/>
            </collection>
        </objectCollectionView>
    </objectCollectionViews>
  </adminGuiConfiguration>

-->
<archetype oid="00000000-0000-0000-0000-000000000321"
        xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
        xmlns:org='http://midpoint.evolveum.com/xml/ns/public/common/org-3'>
    <name>Business role</name>
    <description>
        Archetype for roles that have meaning from the business perspective.
        Business roles are usually assigned directly to users, often by using
        request-and-approve processes. Business roles are usually composed of
        smaller roles.
    </description>
    <documentation>(ISO27001/A.5.15,ISO27001/A.5.16,ISO27001/A.5.18,ISO27001/A.5.23,ISO27001/A.5.34,ISO27001/A.5.37,ISO27001/A.8.2,ISO27001/A.8.3,ISO27001/A.8.4,ISO27001/A.8.9,ISO27001/A.8.18,ISO27001/A.8.20)</documentation>
    <archetypePolicy>
        <display>
            <label>
                <orig>Business role</orig>
                <translation>
                    <key>businessRole.label</key>
                </translation>
            </label>
            <pluralLabel>
                <orig>Business roles</orig>
                <translation>
                    <key>businessRole.pluralLabel</key>
                </translation>
            </pluralLabel>
            <icon>
                <cssClass>fe fe-role</cssClass>
                <color>green</color>
            </icon>
        </display>
    </archetypePolicy>
    <assignment id="1">
        <identifier>holderType</identifier>
        <assignmentRelation id="2">
            <holderType>RoleType</holderType>
        </assignmentRelation>
    </assignment>
    <inducement>
        <targetRef oid="6451bca8-4035-4fb3-8ab1-5de14da59e18" type="PolicyType" />
    </inducement>
    <inducement>
        <identifier>approver-inducement-2</identifier>
        <documentation>Anyone who has an approver relation to any business role will automatically get (induced) Approver role.</documentation>
        <targetRef oid="00000000-0000-0000-0000-00000000000a" type="RoleType"/>
        <orderConstraint>
            <order>1</order>
            <relation>default</relation>
        </orderConstraint>
        <orderConstraint>
            <order>1</order>
            <relation>approver</relation>
        </orderConstraint>
        <focusType>UserType</focusType>
    </inducement>
</archetype>
