<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Thank you for your response. With your help, I was able to get it working.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">administrativeStatus was always null. However, using effectiveStatus gave me something to work with. I had read the Activation concept page but the effective status section doesn't actually give the path for the effectiveStatus attribute so I hadn't tried it.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">For reference for people who find this thread later, here's my attribute.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"> <attribute id="47"><br> <ref>ri:DeleteAccount</ref><br> <tolerant>false</tolerant><br> <exclusiveStrong>false</exclusiveStrong><br> <outbound><br> <authoritative>false</authoritative><br> <exclusive>false</exclusive><br> <strength>strong</strength><br> <source><br> <path>activation/administrativeStatus</path><br> </source><br> <source><br> <path>activation/effectiveStatus</path><br> </source><br> <expression><br> <script><br> <code><br>import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;<br><a href="http://log.info">log.info</a>("Admin Status: " + administrativeStatus + " Disabled: " + ActivationStatusType.DISABLED + " Effective: " + effectiveStatus);<br>if ( effectiveStatus == ActivationStatusType.DISABLED<br> || effectiveStatus == ActivationStatusType.ARCHIVED<br> ) {<br> <a href="http://log.info">log.info</a>("User is disabled");<br> return "Y";<br>}<br>else {<br> <a href="http://log.info">log.info</a>("User is active");<br> return "N";<br>}<br><br> </code><br> </script><br> </expression><br> </outbound><br> </attribute><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 22, 2022 at 4:36 AM Fabian Noll-Dukiewicz <fabian.noll-dukiewicz@veryfy.gmbh> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-7787881626046731200">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi Randall,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
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.
(<a href="https://docs.evolveum.com/midpoint/reference/concepts/activation/#:~:text=The%20effective%20status%20is%20the%20property%20that%20is%20used%20by,haven't%20taken%20place%20yet." title="https://docs.evolveum.com/midpoint/reference/concepts/activation/#:~:text=The%20effective%20status%20is%20the%20property%20that%20is%20used%20by,haven't%20taken%20place%20yet." target="_blank">see
documentation</a>)</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<span style="background-color:transparent">
<table cellspacing="0" cellpadding="1" style="border-collapse:collapse">
<tbody>
<tr>
<td style="width:120px;border-width:1px;border-style:solid;border-color:rgb(171,171,171);background-color:transparent" scope="">
<outbound><br>
<source><br>
<c:path>activation/administrativeStatus</c:path><br>
</source><br>
<expression><br>
<script><br>
<code><br>
//do your stuff<br>
import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;<br>
if(administrativeStatus == ActivationStatusType.DISABLED) {<br>
<a href="http://log.info" target="_blank">log.info</a>("User is disabled.");<br>
return "0";<br>
} else {<br>
<a href="http://log.info" target="_blank">log.info</a>("User is active.");<br>
return "1";<br>
}<br>
</code><br>
</script><br>
</expression></td>
</tr>
</tbody>
</table>
</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Good luck!</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Kind regards,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Fabian</div>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_-7787881626046731200Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<p style="color:rgb(32,31,30);text-align:start;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif;margin:0px">
<b><span style="font-size:10pt;font-family:Verdana,sans-serif;margin:0px;color:black">Fabian Noll-Dukiewicz</span></b><b><span style="font-family:Verdana,sans-serif;margin:0px;color:black"></span></b></p>
<p style="color:rgb(32,31,30);text-align:start;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif;margin:0px">
<i><span style="font-size:10pt;font-family:Verdana,sans-serif;margin:0px;color:black">Spezialist Identity & Access Management | Geschäftsführer</span></i></p>
<p style="color:rgb(32,31,30);text-align:start;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif;margin:0px">
<span lang="en-US" style="font-size:10pt;font-family:Verdana,sans-serif;margin:0px;color:black">Tel.: +49 152 244 63 211</span></p>
<p style="color:rgb(32,31,30);text-align:start;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif;margin:0px">
<span lang="en-US" style="font-size:10pt;font-family:Verdana,sans-serif;margin:0px;color:black">Email:
<a href="mailto:fabian@veryfy.gmbh" title="mailto:fabian@veryfy.gmbh" target="_blank">fabian@veryfy.gmbh</a></span></p>
<p style="color:rgb(32,31,30);text-align:start;background-color:rgb(255,255,255);font-size:11pt;font-family:Calibri,sans-serif;margin:0px">
<span style="font-size:10pt;font-family:Verdana,sans-serif;margin:0px;color:black">Web:<span style="margin:0px"> <a href="https://veryfy.gmbh" id="m_-7787881626046731200LPlnkOWALinkPreview" target="_blank">https://veryfy.gmbh</a> </span></span></p>
<div>
<div id="m_-7787881626046731200LPBorder_GTaHR0cHM6Ly92ZXJ5ZnkuZ21iaC8." style="width:100%;margin-top:16px;margin-bottom:16px;max-width:800px;min-width:424px">
<table id="m_-7787881626046731200LPContainer774455" role="presentation" style="padding:12px 36px 12px 12px;width:100%;border-width:1px;border-style:solid;border-color:rgb(200,200,200);border-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="m_-7787881626046731200LPImageContainer774455" style="margin-right:12px;height:160px;overflow:hidden;width:240px">
<a id="m_-7787881626046731200LPImageAnchor774455" href="https://veryfy.gmbh/" target="_blank"><img id="m_-7787881626046731200LPThumbnailImageId774455" alt="" height="160" style="display: block;" width="240" src="https://veryfy.gmbh/wp-content/uploads/2021/10/FNDIT_Notizen_vor_dem_Macbook.jpg"></a></div>
</td>
<td style="width:100%">
<div id="m_-7787881626046731200LPTitle774455" style="font-size:21px;font-weight:300;margin-right:8px;font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px">
<a id="m_-7787881626046731200LPUrlAnchor774455" href="https://veryfy.gmbh/" style="text-decoration:none" target="_blank">veryfy GmbH - Identity Management neugedacht</a></div>
<div id="m_-7787881626046731200LPDescription774455" style="font-size:14px;max-height:100px;color:rgb(102,102,102);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif;margin-bottom:12px;margin-right:8px;overflow:hidden">
Wir machen Ihr SAP System sicher: Von der Beratung über die Konzeption bis hin zur Umsetzung und dem Betrieb Ihrer Identity Management Lösung.</div>
<div id="m_-7787881626046731200LPMetadata774455" style="font-size:14px;font-weight:400;color:rgb(166,166,166);font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
veryfy.gmbh</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
</div>
</div>
</div>
</div>
<div>
<div id="m_-7787881626046731200appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-7787881626046731200divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Randall Smith <<a href="mailto:rbsmith@adams.edu" target="_blank">rbsmith@adams.edu</a>><br>
<b>Gesendet:</b> Freitag, 18. November 2022 17:55<br>
<b>An:</b> <a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a> <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>><br>
<b>Betreff:</b> [midPoint] Update CSV file based on administrative state?</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div style="font-family:monospace,monospace">Greetings,<br clear="all">
</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace">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.</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace">I tried using focus?.getActivation()?.getAdministrativeStatus() in the outbound attribute of schemahandling but it was always null.</div>
<div style="font-family:monospace,monospace"><br>
</div>
<div style="font-family:monospace,monospace">What's the right way to change an outbound value for a CSV file based on the administrative status?</div>
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>Randall Smith<br>
</div>
Sr. Systems Administrator / Architect<br>
Adams State University<br>
<a href="http://www.adams.edu/" target="_blank">http://www.adams.edu/</a><br>
719-587-7741<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Randall Smith<br></div>Sr. Systems Administrator / Architect<br>Adams State University<br><a href="http://www.adams.edu/" target="_blank">http://www.adams.edu/</a><br>719-587-7741<br></div></div></div></div>