[midPoint] Importing Users With Their Organization From CSV File.
Anand Kothekar
anand.kothekar at confluxsys.com
Tue Feb 10 13:31:27 CET 2015
Hi,
I was trying to import users from csv file to midpoint.
user is getting added successfully. I also tried assigning End User Role to
all users through Object Template.
<mapping>
<name>basic role</name>
<expression>
<assignmentTargetSearch>
<targetType>c:RoleType</targetType>
<oid>00000000-0000-0000-0000-000000000008</oid>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
</mapping>
Now the scenario is that I want to get User's Organization from CSV file for
that I referred " object-template-org.xml ".
*so I added following code in Object template*
<mapping>
<name>Org-org mapping</name>
<authoritative>true</authoritative>
<source>
<path>extension/ext:orgpath</path>
</source>
<source>
<path>orgType</path>
</source>
<expression>
<assignmentTargetSearch>
<targetType>c:OrgType</targetType>
<filter>
<q:equal>
<q:path>c:name</q:path>
<expression>
<script>
<code>
parent = orgpath.tokenize('/')[1]
if (!parent) {
return "TOP";
} else {
return parent;
}
</code>
</script>
</expression>
</q:equal>
</filter>
<createOnDemand>true</createOnDemand>
<populateObject>
<populateItem>
<expression>
<script>
<code>
orgpath.tokenize('/')[1]
</code>
</script>
</expression>
<target>
<path>name</path>
</target>
</populateItem>
<populateItem>
<expression>
<value>replicated</value>
</expression>
<target>
<path>orgType</path>
</target>
</populateItem>
<populateItem>
<expression>
<script>
<code>
orgpath.tokenize('/')[1..-1].join('/')
</code>
</script>
</expression>
<target>
<path>extension/ext:orgpath</path>
</target>
</populateItem>
</populateObject>
</assignmentTargetSearch>
</expression>
<target>
<path>assignment</path>
</target>
<condition>
<script>
<code>orgType == 'replicated'</code>
</script>
</condition>
</mapping>
but one error is occurs when I try to save Object Template " Error parsing
XML document The prefix "q" for element "q:equal" is not bound. "
Can you please point out where I am doing mistake or I need to follow some
another approach.
Thanks,
Anand Kothekar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150210/3dd53163/attachment.htm>
More information about the midPoint
mailing list