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

<archetype oid="00000000-0000-0000-0000-000000000533"
        xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
        xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
    <name>Provisioning propagation task (many resources)</name>
    <archetypeType>auxiliary</archetypeType>
    <archetypePolicy>
        <display>
            <label>
                <orig>Provisioning propagation task (many resources)</orig>
                <translation>
                    <key>ProvisioningPropagationTask.manyResources.label</key>
                </translation>
            </label>
            <pluralLabel>
                <orig>Provisioning propagation task (many resources)</orig>
                <translation>
                    <key>TaskHandlerSelector.provisioning.task.propagation.multi.handler</key>
                </translation>
            </pluralLabel>
            <icon>
                <cssClass>fa fa-save</cssClass>
                <color>green</color>
            </icon>
        </display>
        <adminGuiConfiguration>
            <objectDetails>
                <type>TaskType</type>
                <panel id="1">
                    <identifier>activity</identifier>
                    <panel id="2">
                        <identifier>work</identifier>
                        <container id="3">
                            <identifier>work-multiPropagation</identifier>
                            <path>activity/work/multiPropagation</path>
                        </container>
                    </panel>
                </panel>
            </objectDetails>
        </adminGuiConfiguration>
    </archetypePolicy>
    <assignment id="4">
        <identifier>holderType</identifier>
        <assignmentRelation id="5">
            <holderType>TaskType</holderType>
        </assignmentRelation>
    </assignment>
    <inducement id="6">
        <identifier>nameMapping</identifier>
        <focusMappings>
            <mapping id="8">
                <strength>weak</strength>
                <expression>
                    <script>
                        <code>
                            return source.name
                        </code>
                    </script>
                </expression>
                <target>
                    <path>name</path>
                </target>
            </mapping>
        </focusMappings>
    </inducement>
    <inducement id="7">
        <identifier>handlerMapping</identifier>
        <focusMappings>
            <mapping id="9">
                <strength>weak</strength>
                <source>
                    <path>activity</path>
                </source>
                <expression>
                    <value>http://midpoint.evolveum.com/xml/ns/public/provisioning/task/propagation/multi-handler-3</value>
                </expression>
                <target>
                    <c:path>handlerUri</c:path>
                </target>
                <condition>
                    <script>
                        <code>
                            activity == null
                        </code>
                    </script>
                </condition>
            </mapping>
        </focusMappings>
    </inducement>
</archetype>
