<div dir="ltr"><div dir="ltr">Hi,</div><div dir="ltr"><br></div><div dir="ltr">did you try the expression for auto complete in policyAction?. This should auto-approve your requests, something like this:</div><div>--snip --</div><div dir="ltr"><policyActions><br> <approval><br> <approvalSchema><br> <stage"><br> <automaticallyCompleted><br> <script><br> <code><br> import com.evolveum.midpoint.xml.ns._public.common.common_3.ApprovalLevelOutcomeType <br> <br>
ApprovalLevelOutcomeType.APPROVE </div><div dir="ltr"><br> </code><br> </script><br> </automaticallyCompleted><br> </stage><br> </approvalSchema><br> </approval><br> </policyActions><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div>--snip--</div></div></div></div></div></div></div><div dir="ltr"><br></div>..just put it after </policyConstraints>, this works for me.</div><div dir="ltr"><br></div><div>Peter.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 28, 2021 at 10:29 AM <<a href="mailto:midpoint-request@lists.evolveum.com">midpoint-request@lists.evolveum.com</a>> 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">Send midPoint mailing list submissions to<br>
<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:midpoint-request@lists.evolveum.com" target="_blank">midpoint-request@lists.evolveum.com</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:midpoint-owner@lists.evolveum.com" target="_blank">midpoint-owner@lists.evolveum.com</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of midPoint digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. [4.0.2] - Issue with role shopping and globalPolicyRule for<br>
approval (Loïc SCHAMBER)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 28 Apr 2021 08:29:18 +0000<br>
From: Loïc SCHAMBER <lschamber@positivethinking.tech><br>
To: midPoint General Discussion <<a href="mailto:midpoint@lists.evolveum.com" target="_blank">midpoint@lists.evolveum.com</a>><br>
Subject: [midPoint] [4.0.2] - Issue with role shopping and<br>
globalPolicyRule for approval<br>
Message-ID:<br>
<<a href="mailto:VE1PR01MB5725BEC9326BB4F14D2771D6B8409@VE1PR01MB5725.eurprd01.prod.exchangelabs.com" target="_blank">VE1PR01MB5725BEC9326BB4F14D2771D6B8409@VE1PR01MB5725.eurprd01.prod.exchangelabs.com</a>><br>
<br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi everyone ,<br>
<br>
I am currently experiencing a strange behaviour that I struggle to explain.<br>
<br>
I have a globalPolicyRule that will change the approval policy for all assignments in order to have the "first decides" behaviour:<br>
<approvalSchema><br>
<stage><br>
<name>Role's approvers</name><br>
<approverRelation>approver</approverRelation><br>
<evaluationStrategy>firstDecides</evaluationStrategy><br>
<outcomeIfNoApprovers>approve</outcomeIfNoApprovers><br>
</stage><br>
</approvalSchema><br>
<br>
In order to apply this on assignment approval I also specified the following constraint:<br>
<policyConstraints><br>
<assignment id="82"><br>
<operation>add</operation><br>
</assignment><br>
</policyConstraints><br>
<br>
My globalPolicyRule works as expected with direct assignment of a role (i.e. only one approval is required)!<br>
However, when we request the same role through the role shopping, the approval process is still the default process. (i.e. all approvers must approve)<br>
<br>
I think it may be a problem coming from the policyConstraints but I still struggle to understand what to set (Even with this documentation <a href="https://docs.evolveum.com/midpoint/devel/design/policy-constraints/" rel="noreferrer" target="_blank">https://docs.evolveum.com/midpoint/devel/design/policy-constraints/</a>).<br>
May you explain me what is expected here, I think that going through the role request is not the same as adding the assignment, but then what should be the constraint?<br>
<br>
Thanks a lot for your help,<br>
Best Regards.<br>
<br>
<br>
<br>
[logo]<<a href="https://www.positivethinking.tech/" rel="noreferrer" target="_blank">https://www.positivethinking.tech/</a>><br>
<br>
Loïc Schamber | IT Consultant<br>
lschamber@positivethinking.tech<mailto:<a href="mailto:lschamber@positivethinking.tech" target="_blank">lschamber@positivethinking.tech</a>><br>
Tel. +41 22 721 07 77<tel:+41%2022%20721%2007%2077> | Direct. +41 22 555 27 69<tel:+41%2022%20555%2027%2069><br>
<br>
<br>
[LinkedIn]<<a href="https://www.linkedin.com/company/the-positive-thinking-company/" rel="noreferrer" target="_blank">https://www.linkedin.com/company/the-positive-thinking-company/</a>> [Instagram] <<a href="https://www.instagram.com/positivethinkingcompany/" rel="noreferrer" target="_blank">https://www.instagram.com/positivethinkingcompany/</a>> [Vimeo] <<a href="https://twitter.com/PTC_Tech" rel="noreferrer" target="_blank">https://twitter.com/PTC_Tech</a>> [Vimeo] <<a href="https://youtube.com/channel/UCfaImWa6r0IoZoUYLhbiF7w" rel="noreferrer" target="_blank">https://youtube.com/channel/UCfaImWa6r0IoZoUYLhbiF7w</a>><br>
Chemin du Pré-Fleuri 5 - CH 1228 Plan-les-Ouates<br>
________________________________<br>
Help save paper, do you really need to print this email?<br>
The content of this email and any attachments are confidential and are intended solely for the person and/or company to whom they are addressed. The information may also be legally privileged. No employee or agent is authorized to conclude any binding agreement on behalf of Positive Thinking Company with another party by email without express written confirmation. If you have received this email in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by return E-mail and delete this message, its attachments and all copies from your system. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions. Thank you for your cooperation.<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment.htm" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment.htm</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image001.png<br>
Type: image/png<br>
Size: 7735 bytes<br>
Desc: image001.png<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment.png" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image002.png<br>
Type: image/png<br>
Size: 2337 bytes<br>
Desc: image002.png<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0001.png" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0001.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image003.png<br>
Type: image/png<br>
Size: 2756 bytes<br>
Desc: image003.png<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0002.png" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0002.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image004.png<br>
Type: image/png<br>
Size: 2358 bytes<br>
Desc: image004.png<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0003.png" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0003.png</a>><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: image005.png<br>
Type: image/png<br>
Size: 2669 bytes<br>
Desc: image005.png<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0004.png" rel="noreferrer" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20210428/f4e7ec9d/attachment-0004.png</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
<br>
------------------------------<br>
<br>
End of midPoint Digest, Vol 108, Issue 24<br>
*****************************************<br>
</blockquote></div></div>