<div dir="ltr">Hi,<div><br></div><div>I'm using in similar scenario this org object template mapping:</div><div><div>    <mapping></div><div>        <name>Root org. assignment</name></div><div>        <strength>strong</strength></div><div>        <source></div><div>            <path>extension/headStructureId</path></div><div>        </source></div><div>        <expression><br></div><div>            <value></div><div><!--                 root Org OID --></div><div>                <targetRef oid="410ef1af-4bb4-490d-9b69-5091005b8794" type="c:OrgType"/></div><div>            </value></div><div>        </expression></div><div>        <target></div><div>            <path>assignment</path></div><div>        </target></div><div>        <condition></div><div>            <script></div><div>                <code>basic.isEmpty(headStructureId) </code></div><div>            </script></div><div>        </condition></div><div>    </mapping></div></div><div><br></div><div>In this case, I have in extension/headStructureId org attribute ID to parent, If this is empty, I assign it to root org with the desired OID.</div><div><br></div><div>best regards,</div><div><br></div><div>Gustav </div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-02 11:04 GMT+01:00 Pertti Kellomäki <span dir="ltr"><<a href="mailto:pertti.kellomaki@datactica.fi" target="_blank">pertti.kellomaki@datactica.fi</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Gustav,<br>
<br>
I thought about this but did not realize the parent can be set automatically. The organizations will mostly be created using the rest-api, and I did not like the idea that the api users would need to be aware of the artificial root object. But if the parent assignment can be made automatic, the rest clients would not need to worry about it.<br>
<br>
I am still finding my way around midPoint. What configuration files do I need to modify in order to make the automatic parent assignment to work?<br>
<br>
Thanks, Pertti<span class="im HOEnZb"><br>
<br>
<br>
2.11.2016, 11:52, Pálos Gustáv kirjoitti:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Pertti,<br>
<br>
this situation in most cases we solve over one "ROOT" org, and assigning all other orgs (your root orgs) what we need under this.<br>
This can be done for example by object template with condition - if you don't have parent, assign "ROOT", in other cases assign same as before.<br>
<br>
Is this solution OK for you?<br>
<br>
Best regards,<br>
<br>
Gustav<br>
<br>
</blockquote>
<br></span><div class="HOEnZb"><div class="h5">
______________________________<wbr>_________________<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/mail<wbr>man/listinfo/midpoint</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">s pozdravom<div><br></div><div>Gustáv Pálos</div></div>
</div>