<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt; color: #000000"><div>Oh, didn't notice it:) Thanks a lot.<br></div><div>Maybe it's also possible to directly address Org's extension attribute?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Jason Everling" <jeverling@bshp.edu><br><b>To: </b>"midpoint" <midpoint@lists.evolveum.com><br><b>Sent: </b>Wednesday, 8 May, 2019 16:39:20<br><b>Subject: </b>Re: [midPoint] Receive value of parentOrg attribute in mapping<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><div dir="ltr"><div dir="ltr">within the mapping playground there is a full example,<br><br><div><div><b><mapping></b></div><div><b><span style="white-space:pre"> </span><source></b></div><div><b><span style="white-space:pre"> </span><path>parentOrgRef</path></b></div><div><b><span style="white-space:pre"> </span></source></b></div><div><b><span style="white-space:pre"> </span><source></b></div><div><b><span style="white-space:pre"> </span><path>name</path></b></div><div><b><span style="white-space:pre"> </span></source></b></div><div><b><span style="white-space:pre"> </span><expression></b></div><div><b><span style="white-space:pre"> </span><script></b></div><div><b><span style="white-space:pre"> </span><code></b></div><div><b><span style="white-space:pre"> </span>org1 = parentOrgRef != null ? midpoint.getOrgByOid(parentOrgRef?.oid) : null</b></div><div><b><span style="white-space:pre"> </span>org2 = org1?.parentOrgRef ? midpoint.getOrgByOid(org1?.parentOrgRef.get(0).oid) : null</b></div><div><b><span style="white-space:pre"> </span>org3 = org2?.parentOrgRef ? midpoint.getOrgByOid(org2?.parentOrgRef.get(0).oid) : null</b></div><div><b><br></b></div><div><b><span style="white-space:pre"> </span>'uid=' + name +</b></div><div><b><span style="white-space:pre"> </span>(org1 ? ',ou=' + org1?.name : '') +</b></div><div><b><span style="white-space:pre"> </span>(org2 ? ',ou=' + org2?.name : '') +</b></div><div><b><span style="white-space:pre"> </span>(org3 ? ',ou=' + org3?.name : '') + ',dc=example,dc=com'</b></div><div><b><span style="white-space:pre"> </span></code></b></div><div><b><span style="white-space:pre"> </span></script></b></div><div><b><span style="white-space:pre"> </span></expression></b></div><div><b><span style="white-space:pre"> </span><target></b></div><div><b><span style="white-space:pre"> </span><path>description</path></b></div><div><b><span style="white-space:pre"> </span></target></b></div><div><b></mapping></b></div><div><b><br></b></div><div><b><br></b></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><br></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 8, 2019 at 3:15 AM Vladislavs Filipciks <<a href="mailto:vladislavs.filipciks@csolutions.lv" target="_blank">vladislavs.filipciks@csolutions.lv</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:10pt;color:rgb(0,0,0)"><div>Hello.<br></div><br><div>I have Organization Structure in MidPoint, so each new child created in tree will have assignment of parent Org.<br></div><div>Is it possible to get data from parent Org attribute to use in mapping?<br></div><div>Currently each Org has extension attribute adOUPath that refers to OU path in AD ( OU=Org1,OU=Org2,OU=Org3 etc.).<br></div><div>When new child is created, I want to take parentOrg's adOUPath value and map it to child's attribute. <br></div><br><div>What I already tried is:<br></div><div> <mapping><br> <strength>weak</strength><br> <name>Org OU path from assignment mapping</name><br> <source><br> <path>$focus/focusAssignment/extension/adOUPath</path><br> </source><br> <source><br> <path>$focus/name</path><br> </source><br> <expression><br> <script><br> <code><br> <a href="http://log.info" target="_blank">log.info</a>("adOUPath is " + adOUPath);<br> if(adOUPath!=null){<br> newPath = "OU=" + name + "," + adOUPath;<br> return newPath;<br> }<br> </code><br> </script><br> </expression><br> <target><br> <path>$focus/extension/adOUPath</path><br> </target><br> </mapping><br><br></div><div>In part of </div><div><source><br> <path>$focus/focusAssignment/extension/adOUPath</path></div><div></source> <br></div><div>I have tried different variables: assignment[0], immediateAssignment, immediateRole and all result in null<br></div><br><div>Thanks in advance.<br></div><br></div></div>_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">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>
</blockquote></div>
<br>_______________________________________________<br>midPoint mailing list<br>midPoint@lists.evolveum.com<br>http://lists.evolveum.com/mailman/listinfo/midpoint<br></div></div></body></html>