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

<archetype oid="00000000-0000-0000-0000-000000000518"
        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:mext="http://midpoint.evolveum.com/xml/ns/public/model/extension-3">
    <name>Execute deltas task (background processing for change execution)</name>
    <assignment id="1">
        <identifier>holderType</identifier>
        <assignmentRelation id="2">
            <holderType>TaskType</holderType>
        </assignmentRelation>
    </assignment>
    <inducement id="3">
        <identifier>nameMapping</identifier>
        <focusMappings>
            <mapping id="4">
                <strength>weak</strength>
                <expression>
                    <script>
                        <code>
                            return source.name
                        </code>
                    </script>
                </expression>
                <target>
                    <path>name</path>
                </target>
            </mapping>
        </focusMappings>
    </inducement>
    <archetypePolicy>
        <display>
            <label>
                <orig>Execute deltas task (background processing for change execution)</orig>
                <translation>
                    <key>ExecuteDeltaTask.label</key>
                </translation>
            </label>
            <pluralLabel>
                <t:orig>Execute deltas task (background processing for change execution)</t:orig>
                <t:translation>
                    <t:key>TaskHandlerSelector.model.execute.deltas.handler</t:key>
                </t:translation>
            </pluralLabel>
            <icon>
                <cssClass>fa fa-wrench</cssClass>
                <color>green</color>
            </icon>
        </display>
        <itemConstraint id="5">
            <path>extension</path>
            <visibility>vacant</visibility>
        </itemConstraint>
        <itemConstraint id="6">
            <path>extension/mext:objectDeltas</path>
            <visibility>visible</visibility>
        </itemConstraint>
        <itemConstraint id="7">
            <path>extension/mext:objectDelta</path>
            <visibility>visible</visibility>
        </itemConstraint>
        <itemConstraint id="8">
            <path>extension/mext:modelExecuteOptions</path>
            <visibility>visible</visibility>
        </itemConstraint>
        <adminGuiConfiguration>
            <objectDetails>
                <type>TaskType</type>
                <panel id="9">
                    <identifier>activity</identifier>
                    <panel id="10">
                        <identifier>work</identifier>
                        <container id="11">
                            <identifier>work-explicitChangeExecution</identifier>
                            <path>activity/work/explicitChangeExecution</path>
                        </container>
                    </panel>
                </panel>
            </objectDetails>
        </adminGuiConfiguration>
    </archetypePolicy>
    <archetypeType>auxiliary</archetypeType>
</archetype>
