[midPoint] Receive value of parentOrg attribute in mapping

Vladislavs Filipciks vladislavs.filipciks at csolutions.lv
Wed May 8 10:15:33 CEST 2019


Hello. 

I have Organization Structure in MidPoint, so each new child created in tree will have assignment of parent Org. 
Is it possible to get data from parent Org attribute to use in mapping? 
Currently each Org has extension attribute adOUPath that refers to OU path in AD ( OU=Org1,OU=Org2,OU=Org3 etc.). 
When new child is created, I want to take parentOrg's adOUPath value and map it to child's attribute. 

What I already tried is: 
<mapping> 
<strength>weak</strength> 
<name>Org OU path from assignment mapping</name> 
<source> 
<path>$focus/focusAssignment/extension/adOUPath</path> 
</source> 
<source> 
<path>$focus/name</path> 
</source> 
<expression> 
<script> 
<code> 
log.info("adOUPath is " + adOUPath); 
if(adOUPath!=null){ 
newPath = "OU=" + name + "," + adOUPath; 
return newPath; 
} 
</code> 
</script> 
</expression> 
<target> 
<path>$focus/extension/adOUPath</path> 
</target> 
</mapping> 

In part of 
<source> 
<path>$focus/focusAssignment/extension/adOUPath</path> 
</source> 
I have tried different variables: assignment[0], immediateAssignment, immediateRole and all result in null 

Thanks in advance. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190508/3b54439f/attachment.htm>


More information about the midPoint mailing list