<div dir="ltr">I am redesigning one of our main resources from a csv feed to a scriptedsql resource, 'because I created it a long time ago in a rush to get it going :( '<div><br></div><div>When using activation, can operators be used or is there another way to handle it?</div><div><br></div><div>Currently, in order for a user to be considered 'active' there must be 2 conditions true</div><div><br></div><div>currentLevel == 'FAC' && currentStatus == 'ACTIVE' would be considered 'enabled'</div><div><br></div><div>currentLevel == 'FAC' && currentStatus == 'RETIRED' would be considered 'disabled'<br></div><div><br></div><div>so on and so on.....</div><div><br></div><div>Question is, can I use expressions/script/code for activation/administrativeStatus in the resource xml? Maybe like the below as an example of how? </div><div><br></div><div><div> <administrativeStatus></div><div> <inbound></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><strength>strong</strength></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span><source></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><path>$shadow/attributes/ri:currentLevel</path></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span></source></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><source></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><path>$shadow/attributes/ri:currentStatus</path></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span></source></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><expression></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><script></div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span><code></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>if (currentLevel == 'STU' && currentStatus == 'Freshman') {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>ActivationStatusType.ENABLED;</div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span>} else if (currentLevel == 'FAC' && currentStatus == 'Active'){</div><div> <span class="gmail-Apple-tab-span" style="white-space:pre"> </span>} else if (.....) {</div><div><div> } else if (.....) {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>} else if (.....) {</div></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>} else {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>ActivationStatusType.DISABLED;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></code></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></script></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></expression></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></inbound></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span></administrativeStatus></div></div><div><br></div><div>Thanks!</div><div><br></div><div><div><div class="gmail-m_8788949712117547557gmail_signature"><div dir="ltr">JASON</div></div></div>
</div></div>