[midPoint] Inbound mapping to custom extension "attributes"

Deepak Natarajan dnataraj at trilobytesystems.com
Mon May 26 13:32:47 CEST 2014


Hi everyone -

I am trying to achieve the following inbound mapping :

from resource :
"groups" : "a_1,b_2,c_3,d_4"

to

<user>
    <group id="1">a</group>
    <group id="2">b</group>
    <group id="3">c</group>
  </user>

My custom schema extension seems to be accepted by Midpoint. I have
extended the UserType to support a multi-valued child element <group>
with an "id" attribute (I have a GroupType defined in my custom schema).

I can achieve the simple case, without the "id" attribute. So I can see
in the Admin Console that the User has several groups, which I do with
the following mapping :

<attribute>
        <ref>ri:groups</ref>
        <inbound>
            <expression>
                <script>
                    <code>
                         [parse input and return array of string [a, b,
c...]
                    </code>
                </script>
            </expression>
            <target>
                <path>$user/extension/my:group</path>
            </target>
        </inbound>
</attribute>

Now I'm trying to map attributes for the group element
($user/extension/my:group/@id)

Has anyone tried this? Thanks for any input!

BR/
-- 
Deepak Natarajan






More information about the midPoint mailing list