<div dir="ltr"><div><div>Hello,<br><br></div>i am working on workflows and have a problem. My hook is assigning roles to users which get imported to the system. My metarole has an inducment with an approval schema like below. When i import a new user from a ressource everything seems OK. The approval schema gets approved automatically because a superuser requested the import and then a task is created automatically by the hook to assign the correct roles. This tasks fails with an error "An exception occurred within model operation, in task Task(id:1480338905821-0-1, name:Approving and executing creation of <username>"...<br>Object of type 'UserType' with oid '57776a53-8ff2-4715-acb8-<wbr>a2f89da7dc28' was not found.<a class="m_722040331000202663gmail-box-title" id="m_722040331000202663gmail-id6071">
</a><br></div>Is it possible to disable the approval schema for importing users? Or disableing the approval process for all things done by the hook? Without the approval schema in the metarole the hook works well. <br><div><div><div><br><inducement><br> <focusMappings><br> <mapping><br> <strength>strong</strength><br> <expression><br> <value><br> <name>Approval Schema</name><br> <description>Alle Anfragen müssen vom Admin genehmigt werden</description><br> <level><br> <name>IDM ADMIN</name> <br> <approverRef oid="00000000-0000-0000-0000-0<wbr>00000000002" type="c:UserType"><br> <description>superuser</descr<wbr>iption><br> </approverRef><br> <automaticallyApproved><br> <description>If the user has Superuser assignment, this role is automatically approved for him.</description><br> <br> <script><br> <code><br> import com.evolveum.midpoint.prism.*;<br> import <a href="http://com.evolveum.midpoint.prism.pa">com.evolveum.midpoint.prism.pa</a><wbr>th.*;<br> import com.evolveum.midpoint.xml.ns._<wbr>public.common.common_3.*;<br> midpoint.isDirectlyAssigned(r<wbr>equester, midpoint.searchObjectByName(Ro<wbr>leType, "Superuser"))<br> </code><br> </script><br> </automaticallyApproved><br> </level><br> </value><br> </expression><br> <target><br> <path>approvalSchema</path><br> </target><br> </mapping><br> </focusMappings> <br></inducement><br><br></div><div>Nico <br></div></div></div></div>