[midPoint] Setting approverExpression to roles
Aivo Kuhlberg
aivo.kuhlberg at rmit.ee
Tue Oct 25 10:39:12 CEST 2016
Hi again,
One thing I noticed with focusMappings is that when I edit the focusmappings content in my metarole and then run "Recompute all members" of this metarole and look at the content of member roles then I see both old (before change) and changed focusMappings content. Is that a bug or intended behavior?
Below is an example after I changed description to "New description". You can see that there is now 2 approverExpression sections in role:
...
<assignment id="1">
<targetRef oid="8e8db1f5-6841-4774-a2df-c71b64c6a5b2" type="c:RoleType"><!-- metarole-managerapproves --></targetRef>
</assignment>
<activation>
<effectiveStatus>enabled</effectiveStatus>
<enableTimestamp>2016-10-25T11:16:02.180+03:00</enableTimestamp>
</activation>
<iteration>0</iteration>
<iterationToken/>
<roleMembershipRef oid="8e8db1f5-6841-4774-a2df-c71b64c6a5b2" type="c:RoleType"><!-- metarole-managerapproves --></roleMembershipRef>
<requestable>true</requestable>
<approverExpression>
<description>Get user's managers (except the user itself)</description>
<script>
<code>midpoint.getManagersOidsExceptUser(object)</code>
</script>
</approverExpression>
<approverExpression>
<description>New description</description>
<script>
<code>midpoint.getManagersOidsExceptUser(object)</code>
</script>
</approverExpression>
</role>
Regards,
Aivo Kuhlberg
________________________________
Saatja: Aivo Kuhlberg
Saadetud: 24. oktoober 2016 17:18
Adressaat: midpoint
Teema: Setting approverExpression to roles
Thanks Pavol and Radovan for helping me.
Based on Pavol's link I succeeded to make it work with following metarole:
<role xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" oid="8e8db1f5-6841-4774-a2df-c71b64c6a5b2">
<name>metarole-managerapproves</name>
<inducement id="1">
<focusMappings>
<mapping>
<strength>strong</strength>
<expression>
<value>
<description>Get user's managers (except the user itself)</description>
<script>
<code>midpoint.getManagersOidsExceptUser(object)</code>
</script>
</value>
</expression>
<target>
<path>approverExpression</path>
</target>
</mapping>
</focusMappings>
</inducement>
</role>
Best Regards,
Aivo Kuhlberg
________________________________
Käesolev e-kiri võib sisaldada asutusesiseseks kasutamiseks tunnistatud teavet.
This e-mail may contain information which is classified for official use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161025/166d1e46/attachment.htm>
More information about the midPoint
mailing list