<div dir="ltr">Can anybody else please try this mapping on their end and see if it works?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 1, 2015 at 1:51 PM, Devin Rosenbauer <span dir="ltr"><<a href="mailto:devin@identityworksllc.com" target="_blank">devin@identityworksllc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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">
    <ul><li>
            <div>
    <div 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 title="Partial error">
        <ul><li style="margin-top:5px">
                        <div>
                                <span>operation.com.evolveum.midpoint.web.page.admin.PageAdminFocus.save</span>
                                
                            </div>
                    </li><li>
                        <span>
                            <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?<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div><br>-- <br><div><div dir="ltr">Devin Rosenbauer<br>Principal Consultant<br>Identity Works LLC<br><a href="tel:%2B1%20585%20210%203201" value="+15852103201" target="_blank">+1 585 210 3201</a><br></div></div>
</div></font></span></div></div>
</blockquote></div><br><br clear="all"><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>