<div dir="ltr">I am using,<div><br></div><div>git-v3.0.1devel-693-g11c758b<br></div><div><br></div><div>I will update to the latest since I am behind what yours is at and let you know</div><div><br></div><div>JASON</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 10, 2014 at 1:35 PM, Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@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">
I have re-added the Org assignment as I was testing last week. It's
still working.<br>
<br>
This is what I added at the end of the template:<br>
<br>
<mapping><br>
<authoritative>true</authoritative><br>
<source><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>organization</c:path><br>
</source><br>
<expression><br>
<assignmentTargetSearch><br>
<targetType
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>c:OrgType</targetType><br>
<filter
xmlns:q=<a href="http://prism.evolveum.com/xml/ns/public/query-3" target="_blank">"http://prism.evolveum.com/xml/ns/public/query-3"</a>><br>
<q:equal><br>
<q:path>name</q:path><br>
<expression><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>$organization</c:path><br>
</expression><br>
</q:equal><br>
</filter><br>
</assignmentTargetSearch><br>
</expression><br>
<target><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>assignment</c:path><br>
</target><br>
</mapping><br>
<br>
User:<br>
<user
xmlns=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="9be4e4c9-66fc-4fbe-83c8-286ebfb9ac6e"<br>
version="1"><br>
<name>anpapecok5</name><br>
<parentOrgRef oid="00000000-8888-6666-0000-100000000030"
type="OrgType"><!-- Posam --></parentOrgRef><br>
<metadata><br>
<createTimestamp>2014-12-10T20:30:38.743+01:00</createTimestamp><br>
<creatorRef oid="00000000-0000-0000-0000-000000000002"
type="UserType"><!-- administrator --></creatorRef><br>
<createChannel><a href="http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#liveSync" target="_blank">http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#liveSync</a></createChannel><br>
</metadata><br>
<linkRef oid="abb8d8cc-507b-4210-aac7-3777c37b4b5b"
type="ShadowType"><!-- papecok5 --></linkRef><br>
<assignment id="1"><br>
<targetRef
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="00000000-8888-6666-0000-100000000030"<br>
type="c:OrgType"><!-- MyOrg
--></targetRef><br>
</assignment><br>
<activation><br>
<effectiveStatus>disabled</effectiveStatus><br>
<disableTimestamp>2014-12-10T20:30:38.086+01:00</disableTimestamp><br>
</activation><span class=""><br>
<iteration>4</iteration><br>
<iterationToken>5</iterationToken><br>
<givenName>Andrej</givenName><br>
<familyName>Papecok</familyName><br></span>
<emailAddress><a href="mailto:anpapecok5@bshp.edu" target="_blank">anpapecok5@bshp.edu</a></emailAddress><br>
<employeeNumber>papecok5</employeeNumber><br>
<costCenter>xxx</costCenter><br>
<organization>MyOrg</organization><br>
. . .<br>
</user><br>
<br>
So unless there is any trick hidden in the other mappings, maybe the
issue was resolved since your snapshot... Can you post the exact
midPoint version?<span class="HOEnZb"><font color="#888888"><br>
<br>
I.</font></span><div><div class="h5"><br>
<br>
<br>
<div>On 12/10/2014 08:25 PM, Jason Everling
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">No not really, looks to be the same,
<div><br>
</div>
<div>I attached the template,</div>
<div><br>
</div>
<div>The only thing else besides creating the username and email
address is that it assigns the correct Org based on the
costCenter attribute which is mapped to program in my CSV and
also assigns a role,</div>
<div><br>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Dec 10, 2014 at 1:18 PM, Ivan
Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@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"> Hi Jason,<br>
<br>
this is interesting: it seems to work:<br>
<br>
Right now I have resource with object template reference
in unmatched action:<br>
. . .<br>
<reaction><br>
<situation>unmatched</situation><br>
<objectTemplateRef
oid="10000000-0000-0000-1111-000000000203"/><br>
<action
ref=<a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/model/action-3#addUser"</a>/><br>
</reaction><br>
. . .<br>
<br>
The template:<br>
<objectTemplate xmlns=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="10000000-0000-0000-1111-000000000203"<br>
version="2"><br>
<name>Default User Template (VIX)</name><br>
<iteration><br>
<maxIterations>999</maxIterations><span><br>
<tokenExpression><br>
<script><br>
<code><br>
if (iteration == 0) {<br>
return "";<br>
} else {<br>
return "" + (iteration+1)<br>
}<br>
</code><br>
</script><br>
</tokenExpression><br>
</iteration><br>
<mapping><br>
</span> <name>Generate Username</name><br>
<source><br>
<name>tmpGivenName</name><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>givenName</c:path><span><br>
</source><br>
<source><br>
<name>tmpFamilyName</name><br>
</span> <c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>familyName</c:path><br>
</source><span><br>
<expression><br>
<script><br>
<code><br>
tmpGivenNameInitial =
basic.stringify(tmpGivenName)?.size() > 0 ?
(basic.stringify(tmpGivenName)).substring(0,2) : ''<br>
if (iteration == 0) {<br>
basic.norm(basic.stringify(tmpGivenNameInitial +
tmpFamilyName))<br>
}<br>
else {<br>
basic.norm(basic.stringify(tmpGivenNameInitial +
tmpFamilyName)) + iterationToken<br>
}<br>
</code><br>
</script><br>
</expression><br>
<target><br>
</span> <c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>name</c:path><br>
</target><br>
</mapping><br>
<mapping><br>
<source><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>$user/name</c:path><br>
</source><br>
<source><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>$user/emailAddress</c:path><span><br>
</source><br>
<expression><br>
<script><br>
<language><a href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy" target="_blank">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</a></language><br>
</span> <code><a href="mailto:name%2B%27@bshp.edu" target="_blank">name+'@bshp.edu</a>'</code><br>
</script><br>
</expression><br>
<target><br>
<c:path
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a>>emailAddress</c:path><br>
</target><br>
</mapping><br>
</objectTemplate><br>
<br>
The CSV entry:<br>
employeeID,firstname,lastname,otherMailbox,program,organization<br>
"papecok4","Andrej","Papecok","papecok4","xxx","MyOrg"<br>
<br>
MidPoint User after sync:<br>
<user xmlns=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="93b18a69-f030-4164-9cef-ef955233b2bc"<br>
version="1"><br>
<name>anpapecok4</name><br>
. . .<br>
<iteration>3</iteration><br>
<iterationToken>4</iterationToken><br>
<givenName>Andrej</givenName><br>
<familyName>Papecok</familyName><br>
<b> <emailAddress><a href="mailto:anpapecok4@bshp.edu" target="_blank">anpapecok4@bshp.edu</a></emailAddress></b><br>
<employeeNumber>papecok4</employeeNumber><br>
. . .<br>
</user><br>
<br>
This is midPoint git-v3.0.1devel-704-g0937a70<br>
<br>
Can you see any difference with your config...?<br>
<br>
Regards,<br>
Ivan
<div>
<div><br>
<br>
<div>On 12/10/2014 05:13 PM, Jason Everling wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">So I disabled or removed that
template from the resource reactions, I set it as
the default template is sysconfig.
<div><br>
</div>
<div>It still does it, <emailAddress><a href="mailto:null@domain.com" target="_blank">null@domain.com</a></emailAddress>
seems to be affected,</div>
<div><br>
</div>
<div>Wierd though, I turned on debugging,</div>
<div><br>
</div>
<div>It shows the attribute being created
correctly, you can see from the log but in the
gui and in the user xml it is <a href="mailto:null@domain.com" target="_blank">null@domain.com</a></div>
<div><br>
</div>
<div>
<div>ObjectDelta<UserType>(UserType:ab907de7-4302-47ef-8003-36959fc842ef,ADD):</div>
<div> user:
(ab907de7-4302-47ef-8003-36959fc842ef, v0,
UserType)</div>
<div> extension: </div>
<div> otherMailbox: [ <a href="mailto:hhernandez@local.org" target="_blank">hhernandez@local.org</a> ]</div>
<div> eduPersonAffiliation: [ student ]</div>
<div> givenName: Herman</div>
<div> familyName: Hernandes</div>
<div> costCenter: PN</div>
<div> employeeNumber: HE5019982</div>
<div> credentials: </div>
<div> password: </div>
<div> value:
ProtectedStringType(encrypted=EncryptedDataType(encryptionMethod=EncryptionMethodType(algorithm=<a href="http://www.w3.org/2001/04/xmlenc#aes128-cbc" target="_blank">http://www.w3.org/2001/04/xmlenc#aes128-cbc</a>),
keyInfo=KeyInfoType(keyName=HiCJvCmeUCWoiEl3d+uXyd2VeYs=),
cipherData=CipherDataType(cipherValue=[32
bytes])))</div>
<div> activation: </div>
<div> administrativeStatus: ENABLED</div>
<div> effectiveStatus: ENABLED</div>
<div> enableTimestamp:
2014-12-10T10:07:21.502-06:00</div>
<div> <font style="background-color:rgb(255,255,0)" color="#000000">emailAddress: <a href="mailto:hehernandes@domain.com" target="_blank">hehernandes@domain.com</a></font></div>
<div> name: hehernandes</div>
<div> employeeType: [ A2S ]</div>
<div> locale: US</div>
<div> organization: [ OU=DPN,OU=SHP
Students,DC=TEST,DC=LOCAL ]</div>
<div> locality: San Antonio</div>
<div> fullName: Herman Hernandes</div>
<div> iteration: 0</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Dec 10, 2014 at
9:46 AM, Ivan Noris <span dir="ltr"><<a href="mailto:ivan.noris@evolveum.com" target="_blank">ivan.noris@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"> Jason,<br>
<br>
I believe I have seen this couple of weeks
ago when debugging the iterator problem...
seems that I've forgotten about this.<br>
<br>
But as far I can remember, it has worked
when the mapping was in global system
template instead of the resource-referenced.<br>
<br>
If you can temporarily disable using of the
template in resource and set the same
template in System Configuration for
UserType objects, can you please test the
behaviour?<br>
<br>
Anyway it seems to be a bug, so after you
could confirm the behaviour, I'd create a
new issue.<br>
<br>
Thanks,<br>
I.
<div>
<div><br>
<br>
<div>On 12/10/2014 04:32 PM, Jason
Everling wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">Since I upgraded to 3.1
and I am not sure if this is related
to the other CSV Resource issue.
<div><br>
</div>
<div>Here is the mapping for the
template, it worked fine in 3.0.1
so I do not know if anything
changed, the email address is
built using name + '@<a href="http://domain.com" target="_blank">domain.com</a>'
but when the user is created I get
<a href="mailto:null@domain.com" target="_blank">null@domain.com</a>,
like it is not picking up the
username from the first mapping</div>
<div><br>
</div>
<div>
<div> <mapping></div>
<div> <name>Generate
Username for CSV</name></div>
<div> <source></div>
<div>
<name>tmpGivenName</name></div>
<div>
<path>givenName</path></div>
<div> </source></div>
<div> <source></div>
<div>
<name>tmpFamilyName</name></div>
<div>
<path>familyName</path></div>
<div> </source></div>
<div> <!-- Will generate
username in the filastname
format with iterator,</div>
<div> filastname</div>
<div> filastname2</div>
<div> --></div>
<div> <expression></div>
<div> <script></div>
<div> <code></div>
<div>
tmpGivenNameInitial =
basic.stringify(tmpGivenName)?.size()
> 0 ?</div>
<div>
(basic.stringify(tmpGivenName)).substring(0,2)
: ''</div>
<div> if
(iteration == 0) {</div>
<div>
basic.norm(basic.stringify(tmpGivenNameInitial
+ tmpFamilyName))</div>
<div> }</div>
<div> else {</div>
<div>
basic.norm(basic.stringify(tmpGivenNameInitial
+ tmpFamilyName)) +
iterationToken</div>
<div> }</div>
<div> </code></div>
<div> </script></div>
<div> </expression></div>
<div> <target></div>
<div>
<path>name</path></div>
<div> </target></div>
<div> </mapping></div>
<div><br>
</div>
<div> <iteration></div>
<div>
<maxIterations>25</maxIterations></div>
<div>
<tokenExpression></div>
<div> <script></div>
<div> <code></div>
<div> if
(iteration == 0) {</div>
<div> return
"";</div>
<div> } else {</div>
<div> return ""
+ (iteration+1)</div>
<div> }</div>
<div> </code></div>
<div> </script></div>
<div>
</tokenExpression></div>
<div> </iteration></div>
<div><br>
</div>
<div> <mapping></div>
<div> <source></div>
<div>
<path>$user/name</path></div>
<div> </source></div>
<div> <expression></div>
<div> <script></div>
<div>
<language><a href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy" target="_blank">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</a></language></div>
<div>
<code>name + '@<a href="http://domain.com" target="_blank">domain.com</a>'</code></div>
<div> </script></div>
<div> </expression></div>
<div> <target></div>
<div>
<path>emailAddress</path></div>
<div> </target></div>
<div> </mapping></div>
</div>
<div><br>
</div>
</div>
<br>
</div>
</div>
<font><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any
attachments is proprietary and
confidential; intended for only the
recipient(s) named above and may contain
information that is privileged. You
should not retain, copy or use this
e-mail or any attachments for any
purpose, or disclose all or any part of
the contents to any person. Any views or
opinions expressed in this e-mail are
those of the author and do not represent
those of the Baptist School of Health
Professions. If you have received this
e-mail in error, or are not the named
recipient(s), you are hereby notified
that any review, dissemination,
distribution or copying of this
communication is prohibited by the
sender and to do so might constitute a
violation of the Electronic
Communications Privacy Act, 18 U.S.C.
section 2510-2521. Please immediately
notify the sender and delete this e-mail
and any attachments from your computer.
</font><br>
<br>
<fieldset></fieldset>
<br>
<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><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
<a href="http://evolveum.com" target="_blank">evolveum.com</a> <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</font></span></div>
<br>
_______________________________________________<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" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<font><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is
proprietary and confidential; intended for only
the recipient(s) named above and may contain
information that is privileged. You should not
retain, copy or use this e-mail or any attachments
for any purpose, or disclose all or any part of
the contents to any person. Any views or opinions
expressed in this e-mail are those of the author
and do not represent those of the Baptist School
of Health Professions. If you have received this
e-mail in error, or are not the named
recipient(s), you are hereby notified that any
review, dissemination, distribution or copying of
this communication is prohibited by the sender and
to do so might constitute a violation of the
Electronic Communications Privacy Act, 18 U.S.C.
section 2510-2521. Please immediately notify the
sender and delete this e-mail and any attachments
from your computer. </font><br>
<br>
<fieldset></fieldset>
<br>
<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>
<pre cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
<a href="http://evolveum.com" target="_blank">evolveum.com</a> <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</div>
</div>
</div>
<br>
_______________________________________________<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" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<font><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and
confidential; intended for only the recipient(s) named above and
may contain information that is privileged. You should not
retain, copy or use this e-mail or any attachments for any
purpose, or disclose all or any part of the contents to any
person. Any views or opinions expressed in this e-mail are those
of the author and do not represent those of the Baptist School
of Health Professions. If you have received this e-mail in
error, or are not the named recipient(s), you are hereby
notified that any review, dissemination, distribution or copying
of this communication is prohibited by the sender and to do so
might constitute a violation of the Electronic Communications
Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments
from your computer. </font><br>
<br>
<fieldset></fieldset>
<br>
<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>
<pre cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
<a href="http://evolveum.com" target="_blank">evolveum.com</a> <a href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</div></div></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" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>
<br>
<font size="2"><br><br>CONFIDENTIALITY NOTICE:<br>This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of the Baptist School of Health Professions. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer. </font><br>