<div dir="ltr">Version is 3.3.<br><div><br>I've got the following in my user template, based on a somewhat modified version of what's in the documentation online:<br><br> <mapping><br> <source><br> <c:path>$user/givenName</c:path><br> </source><br> <expression><br> <assignmentTargetSearch><br> <targetType>c:OrgType</targetType><br> <filter><br> <q:equal><br> <q:path>c:name</q:path><br> <q:value><br> <expression><br> <path>$givenName</path><br> </expression><br> </q:value><br> </q:equal><br> </filter><br> <createOnDemand>true</createOnDemand><br> <populateObject><br> <populateItem><br> <expression><br> <c:path>$givenName</c:path><br> </expression><br> <target><br> <c:path>name</c:path><br> </target><br> </populateItem><br> </populateObject><br> </assignmentTargetSearch><br> </expression><br> <target><br> <c:path>assignment</c:path><br> </target><br> </mapping><br clear="all"><div><br></div><div>I expect that this would create an Org called "Devin" and assign the user to it.<br><br></div><div>Here's what I get as an error message when I attempt to save and reconcile the user:<br><div style="width:1121px" class="" id="id1c92">
<ul class=""><li>
<div style="" class="">
<div class="" id="id1d0b" title="Partial error">Failed
to convert query. Reason: Null polystring orig in XNode(map:1
entries)(givenName=PPV(PolyString:Devin); ) in expression in mapping in
objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)</div>
<div class="" id="id1d0b_content" title="Partial error">
<ul class=""><li style="margin-top:5px">
<div class="">
<span>operation.com.evolveum.midpoint.web.page.admin.PageAdminFocus.save</span>
</div>
</li><li>
<span class="">
<u>Cause:</u>
<span><p>Failed to convert query. Reason: Null polystring
orig in XNode(map:1 entries)(givenName=PPV(PolyString:Devin); ) in
expression in mapping in
objectTemplate:c0c010c0-d34d-b33f-f00d-777222222334(User Template 2)</p></span>
</span>
</li></ul>
</div>
</div>
</li></ul>
</div>The documentation on the Expressions page and the samples appear to be somewhat incorrect here. I've had to make some corrections from <query> to <filter>, adding a <source>, and so forth. I also am temporarily using an OOTB field instead of a custom field to ensure that it's a PolyString and not an xsd:string, just to make sure that wasn't the issue.<br><br>At this point, it seems pretty clear that it is grabbing the value in the XNodeMap, since it's printed in the error message. <br><br>So, how should this mapping be structured to do what I need to do?<br></div><div><br>-- <br><div class="gmail_signature"><div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br>+1 585 210 3201<br></div></div>
</div></div></div>