[midPoint] Multi-Valued Attributes And Outbound Mapping Script Issue

iam-mailing at tk.de iam-mailing at tk.de
Tue Dec 17 16:37:40 CET 2024


Hi,

the solution is to use the relativity mode in the expression inside the outbound mapping:

<expression>
    <script>
        <relativityMode>absolute</relativityMode>
        <code>
            imput?.join(";")
        </code>
    </script>
</expression>


This will only evaluate the mapping once with the whole list as input.

Kind Regards

Emil Militzer
__________________________


Techniker Krankenkasse
Unternehmenszentrale


Emil Militzer
Team Access & Web Applications (AWA)



Von: midPoint <midpoint-bounces at lists.evolveum.com> im Auftrag von Sebastian Beetz via midPoint <midpoint at lists.evolveum.com>
Antworten an: midPoint General Discussion <midpoint at lists.evolveum.com>
Datum: Dienstag, 17. Dezember 2024 um 16:32
An: "midpoint at lists.evolveum.com" <midpoint at lists.evolveum.com>
Cc: Sebastian Beetz <sebastian.beetz at kogit.de>
Betreff: [midPoint] Multi-Valued Attributes And Outbound Mapping Script Issue

EXTERNE E-MAIL - Bitte prüfen Sie die Vertrauenswürdigkeit der Absender-Informationen, bevor Sie Links oder Anhänge öffnen.
________________________________
Hi Community,

I am looking for directions or advice for using an extended user attribute in an outbound mapping.

We have set up a schema extension with multi-valued attribute “employeeType” as following:
<xsd:complexType name="UserExtensionType">
                <xsd:annotation>
                        <xsd:appinfo>
                                <a:extension ref="c:UserType"/>
                        </xsd:appinfo>
                </xsd:annotation>
                <xsd:sequence>
                        <xsd:element name="employeeType" type="xsd:string" minOccurs="0" maxOccurs="unbounded">
                                <xsd:annotation>
                                        <xsd:appinfo>
                                                <a:indexed>true</a:indexed>
                                                <a:displayName>Employee Type</a:displayName>
                                        </xsd:appinfo>
                                        <xsd:documentation>
                                                A multi-valued attribute that collects multiple employee types for one user.
                                        </xsd:documentation>
                                </xsd:annotation>
                        </xsd:element>
                </xsd:sequence>
        </xsd:complexType>
</xsd:schema>


The values, of which can be multiple on one user, are strings like “S”, “M”, “MHD”. I now need to concatenate all the present values into one string, like “;M;MHD;S;” in an outbound mapping.
I am currently facing the issue that the outbound mapping is executed multiple times, as often as there are values present.

Is there any mechanism how all the multiple values can be accessed at once? For example to do sth like: “employeeTypeValues.join(";")” in the expression script.


Best regards and thanks in advance
Sebastian



Sebastian Beetz | Solution Consultant, Head of Internal IT
Mobil: +49 151 67806842 | Tel: +49 6151 7869-142

KOGIT GmbH | Rheinstr. 40-42 | 64283 Darmstadt
www.kogit.de<https://www.kogit.de> | LinkedIn<https://de.linkedin.com/company/kogit-gmbh> | Xing<https://www.xing.com/pages/kogitgmbh> | Instagram<https://www.instagram.com/kogit_gmbh/>

Geschäftsführer: Gerald Kaufhold
Amtsgericht Darmstadt | HRB 8640 | Ust-IdNr: DE224251141
Datenschutzhinweise | www.kogit.de/datenschutz<https://www.kogit.de/datenschutz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20241217/45b6089e/attachment-0001.htm>


More information about the midPoint mailing list