<div dir="ltr"><div class="gmail_default">Hey everyone,</div><div class="gmail_default"><br></div><div class="gmail_default">I noticed that in midPoint 4.0 when I save my systemConfiguration through the GUI it's evaluated against my roles with autoassignment conditions. I found this through an autoassign I wrote which sources activation/effectiveStatus. When I went and saved a change to systemConfiguration it fatal error-ed trying to evaluate the role's condition (as SystemConfigurationType doesn't have effectiveStatus.)</div><div class="gmail_default"><br></div><div class="gmail_default">I wrote a sample role based on the documentation at <a href="https://wiki.evolveum.com/display/midPoint/Role+Autoassign+Configuration" target="_blank">https://wiki.evolveum.com/display/midPoint/Role+Autoassign+Configuration</a> which reproduces this behavior on a clean install of the most recent 4.0 snapshot. To reproduce, enable role autoassignment, import the sample role (included below), and then make an edit to the system configuration via the GUI and save. I tried it on 3.9 and it doesn't seem to cause the same trouble.</div><div class="gmail_default"><br></div><div class="gmail_default">Is there a way of filtering the objects that a given condition will be executed on that I've missed? Maybe I'm missing a new way of doing things in 4.0? I know I could stuff the conditions and role assignment in an object template that is only applied to UserType-s but I was under the impression this is the 'old way' of doing it. </div><div class="gmail_default"><br></div><div class="gmail_default">Information about my install: </div><div class="gmail_default">Version   4.0-SNAPSHOT<br>Git describe git-v4.0devel-1092-gf77681eebe</div><div class="gmail_default"><br></div><div class="gmail_default">The exception that gets thrown:</div><div class="gmail_default"><div class="gmail_default"><font face="courier new, monospace">Error executing changes.<br>com.evolveum.midpoint.util.exception.SchemaException: Cannot find definition of a subitem activation/effectiveStatus of ObjectDeltaObject(systemConfiguration:00000000-0000-0000-0000-000000000<br>001(SystemConfiguration) + ObjectDelta(SystemConfigurationType:00000000-0000-0000-0000-000000000001,MODIFY: ContainerDeltaImpl( / {.../common/common-3}deploymentInformation, REPLACE)) = syste<br>mConfiguration:00000000-0000-0000-0000-000000000001(SystemConfiguration))<br>        at com.evolveum.midpoint.prism.util.ObjectDeltaObject.findIdi(ObjectDeltaObject.java:250)<br></font></div><div class="gmail_default"><font face="courier new, monospace">...stack trace snipped...</font></div><br class="m_4248130892836524263m_-120947295428530298m_-3611821750684859432gmail-Apple-interchange-newline"></div><div class="gmail_default">And the role:</div><div class="gmail_default"><font face="courier new, monospace"><role oid="AAAAAAAA-BBBB-CCCC-DDDD-DEADBEEFCAFE"<br>      xmlns="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"<br>      xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"><br><br>    <name>test</name><br>    <displayName>test</displayName><br>    <autoassign><br>        <enabled>true</enabled><br>        <focus><br>            <mapping><br>                <strength>strong</strength><br>                <source><c:path>$focus/c:activation/effectiveStatus</c:path></source><br>                <condition><br>                    <script><br>                        <code><br>                            if (effectiveStatus?.toString()?.toLowerCase() == "enabled") { return true }<br>                        </code><br>                    </script><br>                </condition><br>            </mapping><br>        </focus><br>    </autoassign><br></role><br></font></div><div class="gmail_default"><br></div><div class="gmail_default">Thanks!</div><div class="gmail_default"><br></div></div>