The mapping marks
fullName attribute as non-tolerant. It means that all values not provided by the object template mappings are discarded. And we provide a very special mapping in the object template: it calls (experimental) method
midpoint.collectAssignedFocusMappingsResults which inspects recently computed assignments (lensContext.evaluatedAssignmentTriple), takes all non-negative values from mappings relevant to fullName from all evaluated non-negative assignments, and returns the value (if present) as its output.
Note: if the target attribute is multivalued, the following template mapping should be used (it should work for the single-valued case as well):
<item> <ref>employeeType</ref> <tolerant>false</tolerant> <mapping> <expression> <script> <relativityMode>absolute</relativityMode> <code> import com.evolveum.midpoint.prism.path.* midpoint.collectAssignedFocusMappingsResults(new ItemPath("employeeType")) </code> </script> </expression> <evaluationPhase>afterAssignments</evaluationPhase> </mapping> </item>