[midPoint] Update CSV file based on administrative state?

Fabian Noll-Dukiewicz fabian.noll-dukiewicz at veryfy.gmbh
Tue Nov 22 12:36:29 CET 2022


Hi Randall,

I think it is not necessary to use script expression to get the administrative status in an outbound mapping. You can access the users attributes values using the <source> element. It could also useful to use effectiveStatus instead of administrativeStatus. (see documentation<https://docs.evolveum.com/midpoint/reference/concepts/activation/#:~:text=The%20effective%20status%20is%20the%20property%20that%20is%20used%20by,haven't%20taken%20place%20yet.>)
​
<outbound>
  <source>
    <c:path>activation/administrativeStatus</c:path>
  </source>
  <expression>
    <script>
      <code>
        //do your stuff
        import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
      if(administrativeStatus == ActivationStatusType.DISABLED) {
        log.info("User is disabled.");
        return "0";
      } else {
        log.info("User is active.");
        return "1";
      }
      </code>
    </script>
  </expression>

Good luck!

Kind regards,
Fabian


Fabian Noll-Dukiewicz

Spezialist Identity & Access Management | Geschäftsführer

Tel.: +49 152 244 63 211

Email: fabian at veryfy.gmbh<mailto:fabian at veryfy.gmbh>

Web: https://veryfy.gmbh

[https://veryfy.gmbh/wp-content/uploads/2021/10/FNDIT_Notizen_vor_dem_Macbook.jpg]<https://veryfy.gmbh/>
veryfy GmbH - Identity Management neugedacht<https://veryfy.gmbh/>
Wir machen Ihr SAP System sicher: Von der Beratung über die Konzeption bis hin zur Umsetzung und dem Betrieb Ihrer Identity Management Lösung.
veryfy.gmbh


________________________________
Von: Randall Smith <rbsmith at adams.edu>
Gesendet: Freitag, 18. November 2022 17:55
An: midpoint at lists.evolveum.com <midpoint at lists.evolveum.com>
Betreff: [midPoint] Update CSV file based on administrative state?

Greetings,

I have a CSV file that's being uploaded to a third party. One of the fields needs to change based on the activation state.

I tried using focus?.getActivation()?.getAdministrativeStatus() in the outbound attribute of schemahandling but it was always null.

What's the right way to change an outbound value for a CSV file based on the administrative status?

--
Randall Smith
Sr. Systems Administrator / Architect
Adams State University
http://www.adams.edu/
719-587-7741
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20221122/e5b23ac0/attachment.htm>


More information about the midPoint mailing list