<div dir='auto'>Hello. Ty for reply. Unfortunately, further in execution I receive exception, that mapping is not possible on null object adGroup.<div dir="auto">I've tried several ways, for example if I remove this mapping from template, then mapping in resource works fine on account import - user is being created, with appropriate account and property adGroup filled nicely. I don't get it, why template mapping isn't working. I got another similar in OU template and it works nicely. </div><div dir="auto"><br></div><div dir="auto">I'll try to remove this user template and extension completely and import them once again.</div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">8 апр. 2020 г. 17:43 пользователь Pavol Mederly <mederly@evolveum.com> написал:<br type="attribution" /><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<p>Hello Vladislavs,</p>
<p>just a quick try: your template mapping should be executed twice
- once for "old" value of extension/adGroup and once for "new"
value of it. So maybe what you see in the log is the first
execution. Isn't there another execution, this time with the
expected value?<br />
</p>
<p>Best regards,<br />
</p>
<pre>Pavol Mederly
Software developer
evolveum.com
</pre>
<div>On 08/04/2020 16:34, Vladislavs
Filipciks wrote:<br />
</div>
<blockquote>
<div style="font-family:'arial' , 'helvetica' , sans-serif;font-size:10pt;color:#000000">
<div>Hello.</div>
<div><br />
</div>
<div>I'm having trouble mapping user extended schema property to
another extended schema property during user import from
resource. The source extension/property is always being null
while object template is processed.</div>
<div>Probably I'm missing some additional config or something.
Could any one suggest/correct me? Config snips:</div>
<div><br />
</div>
<div>Resource:</div>
<div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'consolas' , 'courier new' , monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:#808080"><</span><span style="color:#569cd6">attribute</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">ref</span><span style="color:#808080">></span><span style="color:#d4d4d4">ri:memberOf</span><span style="color:#808080"></</span><span style="color:#569cd6">ref</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">inbound</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">expression</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">script</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">code</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> if(input != null){<!-- --></span></div><div><span style="color:#d4d4d4"> tmpdn = input;</span></div><div><span style="color:#d4d4d4"> groupPath = tmpdn.substring(0, tmpdn.indexOf(",DC="));</span><span style="color:#d4d4d4"> </span></div><div><span style="color:#d4d4d4"> log.info("-- adGroup from resource schemaHandling " + groupPath );</span></div><div><span style="color:#d4d4d4"> return groupPath;</span></div><div><span style="color:#d4d4d4"> }</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">code</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">script</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">expression</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">target</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">path</span><span style="color:#808080">></span><span style="color:#d4d4d4">extension/adGroup</span><span style="color:#808080"></</span><span style="color:#569cd6">path</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">target</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">inbound</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">attribute</span><span style="color:#808080">></span></div></div>
</div>
<div><br />
</div>
<div>Extension schema:</div>
<div><br />
</div>
<div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'consolas' , 'courier new' , monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:#808080"><</span><span style="color:#569cd6">xsd:complexType</span><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">name</span><span style="color:#d4d4d4">=</span><span style="color:#ce9178">"UserExtensionType"</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">xsd:annotation</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">xsd:appinfo</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">a:extension</span><span style="color:#d4d4d4"> </span><span style="color:#9cdcfe">ref</span><span style="color:#d4d4d4">=</span><span style="color:#ce9178">"c:UserType"</span><span style="color:#808080">/></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">xsd:appinfo</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">xsd:annotation</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">xsd:sequence</span><span style="color:#808080">></span></div></div>
</div>
<div><br />
</div>
<div>User template that is being used with sync:</div>
<div><br />
</div>
<div>
<div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'consolas' , 'courier new' , monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"> <div style="color:#d4d4d4;background-color:#1e1e1e;font-family:'consolas' , 'courier new' , monospace;font-weight:normal;font-size:14px;line-height:19px;white-space:pre"><div><span style="color:#808080"><</span><span style="color:#569cd6">mapping</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">name</span><span style="color:#808080">></span><span style="color:#d4d4d4">Ad Group name mapping</span><span style="color:#808080"></</span><span style="color:#569cd6">name</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">source</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">path</span><span style="color:#808080">></span><span style="color:#d4d4d4">extension/adGroup</span><span style="color:#808080"></</span><span style="color:#569cd6">path</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">source</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">expression</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">script</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">code</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> log.info('+++++++++++++++++ adGroup from user template ' + adGroup);</span></div><div><span style="color:#d4d4d4"> if ((groupName = adGroup.split(",CN=")[0].substring(3))){<!-- --></span></div><div><span style="color:#d4d4d4"> return groupName.trim();</span></div><div><span style="color:#d4d4d4"> }</span></div><div><span style="color:#d4d4d4"> groupName = adGroup.split(",OU=")[0].substring(3);</span></div><div><span style="color:#d4d4d4"> log.info('++++++ gorupName from user template ' + groupName);</span></div><div><span style="color:#d4d4d4"> return groupName.trim();</span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">code</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">script</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">expression</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">target</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"><</span><span style="color:#569cd6">path</span><span style="color:#808080">></span><span style="color:#d4d4d4">extension/groupName</span><span style="color:#808080"></</span><span style="color:#569cd6">path</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">target</span><span style="color:#808080">></span></div><div><span style="color:#d4d4d4"> </span><span style="color:#808080"></</span><span style="color:#569cd6">mapping</span><span style="color:#808080">></span></div></div></div>
</div>
<div><br />
</div>
<div>Log:</div>
<div><br />
</div>
<div>
<div><span style="font-size:13.3333px">2020-04-08
17:31:28,495 [MODEL] [http-nio-8080-exec-4] INFO
(com.evolveum.midpoint.expression): -- adGroup from
resource schemaHandling CN=Midpoint Test Group,OU=Midpoint
Test OU,OU=CS_group_users</span></div>
<div><span style="font-size:13.3333px">2020-04-08
17:31:28,496 [MODEL] [http-nio-8080-exec-4] INFO
(com.evolveum.midpoint.expression): -- adGroup from
resource schemaHandling CN=Domain Admins,CN=Users</span></div>
<div><span style="font-size:13.3333px">2020-04-08
17:31:28,500 [MODEL] [http-nio-8080-exec-4] INFO
(com.evolveum.midpoint.expression): -- adOUContainer from
resource schemaHandling OU=Midpoint Test
OU,OU=CS_group_users</span></div>
<div><span style="font-size:13.3333px">2020-04-08
17:31:28,515 [MODEL] [http-nio-8080-exec-4] INFO
(com.evolveum.midpoint.expression): +++++++++++++++++
adGroup from user template null</span></div>
</div>
<div><br />
</div>
<div><br />
</div>
<div><br />
</div>
<div>
<p style="margin:0px;font-stretch:normal;font-size:18px;line-height:normal;font-family:'arial'"><b>Vladislavs
Fiļipčiks</b></p>
<p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:'arial'">+371
6784 7766</p>
<p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:'arial'"><b>SIA
“Corporate Solutions”</b></p>
<p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:'arial'">Pērnavas
43A-9, Rīga, LV-1009</p>
<p style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:'arial';color:#807f7f"><span style="text-decoration:underline;color:#999999"><a href="http://www.csolutions.lv/" style="color:#999999;text-decoration:underline">www.csolutions.lv</a></span><br />
</p>
<p style="margin:0px;font-stretch:normal;font-size:12px;line-height:normal;font-family:'arial';min-height:14px"><br />
<img src="https://drive.google.com/uc?export=view&id=1WuHLZnuvRtyBe4lBkMiUhpEYoRjH4eUH" width="140" height="46" /></p>
<p style="margin:0px;font-stretch:normal;font-size:10px;line-height:normal;font-family:'arial';color:#4c4c4c"><span style="color:#999999">Šis e-pasts un tā
pielikumā esošie dokumenti var saturēt ierobežotas
pieejamības informāciju, cita starpā fizisko personu
datus, kas adresēta tikai tā saņēmējam un izmantojama
tikai leģitīmiem mērķiem. Ja esat saņēmis šo e-pastu
kļūdas dēļ, vai nav pamatota mērķa ierobežotas pieejamības
informācijas, cita starpā fizisko personu datu, apstrādei,
Jums nav tiesību izmantot vai pārsūtīt šajā e-pastā un tam
pievienotajos dokumentos ietverto informāciju. Šādā
gadījumā nekavējoties neatgriezeniski izdzēsiet šo
e-pastu.</span></p>
</div>
</div>
<br />
<fieldset></fieldset>
<pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div>
</blockquote></div><br></div>