[midPoint] conditional matching for activation
Jason Everling
jeverling at bshp.edu
Tue Jan 3 18:36:53 CET 2017
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
:( '
When using activation, can operators be used or is there another way to
handle it?
Currently, in order for a user to be considered 'active' there must be 2
conditions true
currentLevel == 'FAC' && currentStatus == 'ACTIVE' would be considered
'enabled'
currentLevel == 'FAC' && currentStatus == 'RETIRED' would be considered
'disabled'
so on and so on.....
Question is, can I use expressions/script/code for
activation/administrativeStatus in the resource xml? Maybe like the below
as an example of how?
<administrativeStatus>
<inbound>
<strength>strong</strength>
<source>
<path>$shadow/attributes/ri:currentLevel</path>
</source>
<source>
<path>$shadow/attributes/ri:currentStatus</path>
</source>
<expression>
<script>
<code>
import
com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
if (currentLevel == 'STU' && currentStatus == 'Freshman') {
ActivationStatusType.ENABLED;
} else if (currentLevel == 'FAC' && currentStatus
== 'Active'){
} else if (.....) {
} else if (.....) {
} else if (.....) {
} else {
ActivationStatusType.DISABLED;
}
</code>
</script>
</expression>
</inbound>
</administrativeStatus>
Thanks!
JASON
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170103/18354052/attachment.htm>
More information about the midPoint
mailing list