<div dir="ltr"><div>In this case, I'm actually not making any changes to the input object. Given Name is already set to the value that shows up in the error message ("Devin"), and I'm just hitting Save with the Reconcile checkbox checked.<br><br></div>However, this also happens if I change the name to something else. In both cases, it's not null.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 10:02 AM, Radovan Semancik <span dir="ltr"><<a href="mailto:radovan.semancik@evolveum.com" target="_blank">radovan.semancik@evolveum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi,<br>
      <br>
      I have similar mapping working in our story tests.<br>
      <br>
      How does your input object looks like? I mean, how does the user
      looks like before it is processed by the template?<br>
      Is there any chance that the givenName is null?<br>
      <br>
      The evaluation of null expressions has changed a bit in 3.3. But I
      think that your expression should work and you are probably
      hitting a but. I will need more data to replicate it.<br>
      <br>
      <pre cols="72">-- 
Radovan Semancik
Software Architect
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
      <br>
      <br>
      On 12/04/2015 05:15 PM, Devin Rosenbauer wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <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><font color="#888888"><br>
                    </font></span></div>
                <span><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>
          <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>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <br>
  </div>

<br>_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></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>