Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleAutoassignment mapping in a role
<role>
    <name>Support</name>
    ...
    <autoassign>
        <enabled>true</enabled>
        <focus>
			<selector>.  <!-- Since 4.2 -->
				<type>UserType</type>
			</selector>
            <mapping>
               <strength>strong</strength>
               <source>
                    <path>organizationalUnit</path>
                </source>
                <condition>
                    <script>
                        <code>basic.stringify(organizationalUnit) == 'support'</code>
                    </script>
                </condition>
            </mapping>
        </focus>
    </autoassign>
</role>

...

This is all that is needed for simple cases: just specify the condition. MidPoint takes care of all the rest.

Since midPoint 4.2 it is possible to restrict auto assignment evaluation to specific object using selector object. Using example bellow, autoassignment will be applied only for the user with archetype employee:

Code Block
languagexml
titleSelector example
<autoassign>
        <enabled>true</enabled>
        <focus>
			<selector>
				<type>UserType</type>
				<archetypeRef oid="7135e68c-ee53-11e8-8025-170b77da3fd6" type="c:ArchetypeType"> <!-- Employee archetype --> 	
				</archetypeRef>
			</selector>
            ....
        </focus>
</autoassign>

Relation and Other Parameters

...