<!--
  ~ Copyright (c) 2020 Evolveum and contributors
  ~
  ~ Licensed under the EUPL-1.2 or later.
  -->

<archetype oid="00000000-0000-0000-0000-000000000521"
        xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
    <name>Approval-related task</name>
    <archetypePolicy>
        <display>
            <label>
                <orig>Approval-related task</orig>
                <translation>
                    <key>ApprovalRelatedTask.label</key>
                </translation>
            </label>
            <pluralLabel>
                <orig>Approval-related tasks</orig>
                <translation>
                    <key>ApprovalRelatedTask.title</key>
                </translation>
            </pluralLabel>
            <icon>
                <cssClass>fe fe-case</cssClass>
                <color>green</color>
            </icon>
        </display>
        <!-- no configuration yet -->
        <adminGuiConfiguration>
            <objectDetails>
                <type>TaskType</type>
                <panel id="1">
                    <identifier>activity</identifier>
                    <visibility>hidden</visibility>
                </panel>
                <panel id="2">
                    <identifier>taskBasic</identifier>
                    <default>true</default>
                </panel>
            </objectDetails>
        </adminGuiConfiguration>
    </archetypePolicy>
    <assignment id="3">
        <identifier>holderType</identifier>
        <assignmentRelation id="4">
            <holderType>TaskType</holderType>
        </assignmentRelation>
    </assignment>
    <inducement id="5">
        <identifier>nameMapping</identifier>
        <focusMappings>
            <mapping id="7">
                <strength>weak</strength>
                <expression>
                    <script>
                        <code>
                            return source.name
                        </code>
                    </script>
                </expression>
                <target>
                    <path>name</path>
                </target>
            </mapping>
        </focusMappings>
    </inducement>
    <inducement id="6">
        <identifier>handlerMapping</identifier>
        <focusMappings>
            <mapping id="8">
                <strength>weak</strength>
                <expression>
                    <value>http://midpoint.evolveum.com/xml/ns/public/workflow/operation-execution/handler-3</value>
                </expression>
                <target>
                    <c:path>handlerUri</c:path>
                </target>
            </mapping>
        </focusMappings>
    </inducement>
</archetype>
