[midPoint] iterations2
Jan Kaspar
Caspi at seznam.cz
Tue Nov 7 09:27:35 CET 2017
Hi all (again)
i see i paste wrong clipboard to previous post. there is missing
iterationToken
this is current not working template:
<objectTemplate xmlns="http://midpoint.evolveum.com/xml/ns/public/common/
common-3"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/
common-3"
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
xmlns:org="http://midpoint.evolveum.com/xml/ns/public/
common/org-3"
xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/
connector/icf-1/resource-schema-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/
resource/instance-3"
oid="c0c010c0-d34d-b33f-f00d-777333333333"
version="19">
<name>User Template</name>
<metadata>
<createTimestamp>2017-11-07T02:04:12.135+01:00</createTimestamp>
<creatorRef oid="00000000-0000-0000-0000-000000000002"
relation="org:default"
type="c:UserType"><!-- administrator --></creatorRef>
<createChannel>http://midpoint.evolveum.com/xml/ns/public/model/
channels-3#objectImport</createChannel>
</metadata>
<iteration>
<maxIterations>999</maxIterations>
<tokenExpression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="c:ScriptExpressionEvaluatorType">
<code>
if (iteration == 0) {
return "";
} else {
return sprintf("%03d", iteration);
}
</code>
</script>
</tokenExpression>
</iteration>
<mapping>
<description>
Property mapping.
Defines how properties of user object are set up.
This specific definition sets a full name as a concatenation
of givenName and familyName.
</description>
<strength>weak</strength>
<source>
<c:path>$user/givenName</c:path>
</source>
<source>
<c:path>$user/familyName</c:path>
</source>
<expression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="c:ScriptExpressionEvaluatorType">
<language>http://midpoint.evolveum.com/xml/ns/public/expression/
language#Groovy</language>
<code>
givenName + ' ' + familyName
</code>
</script>
</expression>
<target>
<c:path>$user/fullName</c:path>
</target>
</mapping>
<mapping>
<description>
Property mapping.
Defines how properties of user object are set up.
This specific definition sets a full name as a concatenation
of givenName and familyName.
</description>
<strength>weak</strength>
<source>
<c:path>$user/givenName</c:path>
</source>
<source>
<c:path>$user/familyName</c:path>
</source>
<expression>
<script xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="c:ScriptExpressionEvaluatorType">
<language>http://midpoint.evolveum.com/xml/ns/public/expression/
language#Groovy</language>
<code>
givenName + '.' + familyName + iterationToken + '@
hell.cz'
</code>
</script>
</expression>
<target>
<c:path>$user/emailAddress</c:path>
</target>
</mapping>
</objectTemplate>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20171107/8bc05e1f/attachment.htm>
More information about the midPoint
mailing list