<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css"></style>
</head>
<body bgcolor="#FFFFFF" fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Ok, I understand.</div>
<div><br>
</div>
<div>I've been trying to set it up the way your suggest with limited success...</div>
<div><br>
<div>For some reason, in one of my tests, I ended up with an undeletable object in the shadow object types...    I think the only way to fix that for me would be to go into the h2db and do manual queries.  Just wanted to share the problem :</div>
<div><br>
</div>
<div><br>
</div>
<div>Object :</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><object xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"</div>
<div>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</div>
<div>        oid="f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8"</div>
<div>        version="6"</div>
<div>        xsi:type="ShadowType"></div>
<div>   <name></div>
<div>      <orig xmlns="http://prism.evolveum.com/xml/ns/public/types-2">undeletableobject</orig></div>
<div>      <norm xmlns="http://prism.evolveum.com/xml/ns/public/types-2">undeletableobject</norm></div>
<div>   </name></div>
<div>   <trigger id="1"></div>
<div>      <timestamp>2018-01-01T00:00:00.000-05:00</timestamp></div>
<div>      <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/trigger/recompute/handler-2</handlerUri></div>
<div>   </trigger></div>
<div>   <metadata></div>
<div>      <createTimestamp>2013-09-30T14:23:23.817-04:00</createTimestamp></div>
<div>      <creatorRef xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"</div>
<div>                  oid="00000000-0000-0000-0000-000000000002"</div>
<div>                  type="c:UserType"/></div>
<div>      <createChannel>http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-2#discovery</createChannel></div>
<div>      <modifyTimestamp>2013-09-30T14:26:27.965-04:00</modifyTimestamp></div>
<div>      <modifierRef oid="00000000-0000-0000-0000-000000000002"/></div>
<div>      <modifyChannel>http://midpoint.evolveum.com/xml/ns/public/gui/channels-2#user</modifyChannel></div>
<div>   </metadata></div>
<div>   <resourceRef xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"</div>
<div>                oid="af2bc95b-76e0-48e2-86d6-3d4f02d3fafe"</div>
<div>                type="c:ResourceType"/></div>
<div>   <objectClass xmlns:qn363="http://midpoint.evolveum.com/xml/ns/public/resource/instance-2">qn363:AccountObjectClass</objectClass></div>
<div>   <c:kind xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-2a"</div>
<div>           xmlns:icfs="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-2"</div>
<div>           xmlns:t="http://prism.evolveum.com/xml/ns/public/types-2"</div>
<div>           xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-2"</div>
<div>           xmlns:q="http://prism.evolveum.com/xml/ns/public/query-2"</div>
<div>           xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-2"</div>
<div>           xmlns:apti="http://midpoint.evolveum.com/xml/ns/public/common/api-types-2"</div>
<div>           xmlns:wfcf="http://midpoint.evolveum.com/xml/ns/model/workflow/common-forms-2"</div>
<div>           xmlns:m="http://midpoint.evolveum.com/xml/ns/public/model/model-context-2"</div>
<div>           xmlns:ds="http://www.w3.org/2000/09/xmldsig#"</div>
<div>           xmlns:enc="http://www.w3.org/2001/04/xmlenc#">account</c:kind></div>
<div>   <intent>default</intent></div>
<div>   <iteration>0</iteration></div>
<div>   <iterationToken/></div>
<div></object></div>
</div>
<div><br>
</div>
<div><br>
</div>
<div>-----------------------------</div>
<div><br>
</div>
<div>Error when trying to delete it :</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div style="font-family:Tahoma; font-size:13px">
<div style="">
<ul class="messagesTop" style="margin: 0px 0px 20px; padding: 0px; font-family: Arial, Helvetica, sans-serif; font-size: 14px;">
<li style="padding-bottom: 5px; list-style: none outside none; margin: 0px;">
<div class="messages-error" style="color: rgb(204, 10, 12); border: 1px solid rgb(210, 31, 30); padding: 0px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(255, 215, 202);">
<div class="messages-topPanel messages-topError selected" id="id3ea1" title="Partial error" style="padding: 10px 5px 10px 40px; font-weight: bold; background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-icon.png); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; background-color: rgb(255, 194, 174); cursor: pointer; background-position: 12px 50%; background-repeat: no-repeat no-repeat;">
<div class="messages-topMessage" style="display: inline-block; padding-right: 15px;">
Couldn't delete object 'undeletableobject'.</div>
<br>
<div class="messages-topException" style="font-size: 12px; display: inline-block; padding-right: 15px; padding-top: 5px; clear: both; font-weight: normal; width: 1224.546875px;">
<ul style="list-style: none outside none; margin: 0px; padding: 0px;">
<li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<div class="message-info">Delete object (Gui)</div>
</li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Cause:</u> 
<p style="margin: 0px; display: inline;">Subresult com.evolveum.midpoint.provisioning.api.ProvisioningService.deleteObject of operation com.evolveum.midpoint.model.api.ModelService.executeChanges is still UNKNOWN during cleanup; during handling of exception
 com.evolveum.midpoint.util.exception.SystemException: Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement:<br>
delete from m_object where id=? and oid=? [23503-171]</p>
</span></li></ul>
</div>
<span class="messages-topError-arrow arrow-down arrow-up" style="background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-arrow.png); display: inline-block; height: 16px; width: 16px; position: absolute; right: 60px; margin-top: 26px; background-position: 0px 0px; background-repeat: no-repeat no-repeat;"></span></div>
<div class="messages-content messages-error-content" id="id3ea1_content" style="padding-left: 20px; padding-bottom: 5px; padding-right: 10px;">
<ul style="list-style: none outside none; margin: 5px 0px 0px; padding: 0px; min-height: 20px;">
<li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<div style="display: inline-block;"><span class="message-info"><span class="errorStack" id="id3ea2" style="color: rgb(85, 85, 85); font-weight: bold; font-size: 12px; margin-left: 5px;"><span class="showStackText">[ SHOW ERROR STACK ]</span></span></span></div>
<div class="collapseExpand" style="display: inline-block; position: absolute; right: 65px; font-size: 12px;">
<span class="collapseAll" style="padding: 0px 5px;">Collapse all</span> <span class="expandAll" style="padding: 0px 5px;">Expand all</span> <span id="exportToXml" style="padding: 0px 5px;">Export to XML</span></div>
</li></ul>
<ul class="messages-details" style="list-style: none outside none; margin: 0px; padding: 0px;">
<li class="messages-error-details-section" title="Fatal error" style="padding: 2px 0px 1px 25px; list-style: none outside none; margin: 5px 0px 0px; text-overflow: ellipsis; overflow: auto; font-size: 12px; background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-icon.png); background-position: 9px 2px; background-repeat: no-repeat no-repeat;">
<span class="arrow-right messages-error-details-bold-arrow" id="id3ea3_arrow" style="background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-arrow.png); display: inline-block; height: 16px; width: 16px; float: left; margin: 0px 5px; background-position: 0px -16px; background-repeat: no-repeat no-repeat;"></span><span class="messages-details-bold" id="id3ea3" style="padding: 0px; font-weight: bold;">Execute
 changes (Model)</span>
<div class="messages-details-content" id="id3ea3_content" style="padding-left: 30px; background-position: 0px -32px;">
<ul style="list-style: none outside none; margin: 0px; padding: 0px;">
<li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info">Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement: delete from m_object
 where id=? and oid=? [23503-171]</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Param:</u> options: com.evolveum.midpoint.model.api.ModelExecuteOptions@4653a06c</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Cause:</u> 
<p style="margin: 0px; display: inline;">Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement:<br>
delete from m_object where id=? and oid=? [23503-171]</p>
 <span class="errorStack" id="id3ea4" style="color: rgb(85, 85, 85); font-weight: bold; margin-left: 5px;"><span class="showStackText">[ SHOW ERROR STACK ]</span></span></span></li><li class="messages-warn-details-section" title="Unknown" style="padding: 2px 0px 1px 25px; list-style: none outside none; margin: 5px 0px 0px; text-overflow: ellipsis; overflow: auto; background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-warn-icon.png); color: rgb(210, 139, 30); background-position: 9px 2px; background-repeat: no-repeat no-repeat;">
<span class="messages-details selected-section" style="margin-top: 0px; background-color: rgb(255, 232, 224);"><span class="arrow-right messages-warn-details-bold-arrow arrow-down" id="id3ea5_arrow" style="background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-warn-arrow.png); display: inline-block; height: 16px; width: 16px; float: left; margin: 0px 5px; background-position: 0px -32px; background-repeat: no-repeat no-repeat;"></span><span class="messages-details-bold" id="id3ea5" style="padding: 0px; font-weight: bold;">Delete
 object (Provisioning)</span>
<div class="messages-details-content" id="id3ea5_content" style="padding-left: 30px; background-position: 0px -32px;">
<ul style="list-style: none outside none; margin: 0px; padding: 0px;">
<li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"></span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Param:</u> scripts: </span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Param:</u> oid: f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Context:</u> implementationClass: class com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl</span></li><li class="messages-succ-details-section" title="Success" style="padding: 2px 0px 1px 25px; list-style: none outside none; margin: 5px 0px 0px; text-overflow: ellipsis; overflow: auto; background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-succ-icon.png); color: rgb(79, 138, 16); background-position: 9px 1px; background-repeat: no-repeat no-repeat;">
<span class="messages-details" style="margin-top: 0px;"><span class="arrow-right messages-succ-details-bold-arrow" id="id3ea7_arrow" style="background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-succ-arrow.png); display: inline-block; height: 16px; width: 16px; float: left; margin: 0px 5px; background-position: 0px -16px; background-repeat: no-repeat no-repeat;"></span><span class="messages-details-bold" id="id3ea7" style="padding: 0px; font-weight: bold;">Get
 object (Repository)</span></span></li><li class="messages-error-details-section" title="Fatal error" style="padding: 2px 0px 1px 25px; list-style: none outside none; margin: 5px 0px 0px; text-overflow: ellipsis; overflow: auto; background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-icon.png); color: rgb(204, 10, 12); background-position: 9px 2px; background-repeat: no-repeat no-repeat;">
<span class="messages-details selected-section" style="margin-top: 0px;"><span class="arrow-right messages-error-details-bold-arrow arrow-down" id="id3ea9_arrow" style="background-image: url(http://usager-gia/midpoint/wicket/resource/com.evolveum.midpoint.web.component.message.MainFeedback/messages-error-arrow.png); display: inline-block; height: 16px; width: 16px; float: left; margin: 0px 5px; background-position: 0px -32px; background-repeat: no-repeat no-repeat;"></span><span class="messages-details-bold" id="id3ea9" style="padding: 0px; font-weight: bold;">Delete
 object (Repository)</span>
<div class="messages-details-content" id="id3ea9_content" style="padding-left: 30px; background-position: 0px -32px;">
<ul style="list-style: none outside none; margin: 0px; padding: 0px;">
<li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info">Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement: delete from m_object
 where id=? and oid=? [23503-171]</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Param:</u> oid: f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Param:</u> type: com.evolveum.midpoint.xml.ns._public.common.common_2a.ShadowType</span></li><li style="padding: 1px 0px; list-style: none outside none; margin: 0px; text-overflow: ellipsis; overflow: auto;">
<span class="message-info"><u>Cause:</u> 
<p style="margin: 0px; display: inline;">Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement:<br>
delete from m_object where id=? and oid=? [23503-171]</p>
 <span class="errorStack" id="id3eaa" style="color: rgb(85, 85, 85); font-weight: bold; margin-left: 5px;"><span class="hideStackText" style="display: inline;">[ HIDE ERROR STACK ]</span></span></span>
<div class="errorStack-content" id="id3eaa_content" style="margin: 5px 0px 5px 15px; overflow: auto;">
<code>
<p style="margin: 0px; display: inline;">org.hibernate.exception.ConstraintViolationException: Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')";
 SQL statement:<br>
delete from m_object where id=? and oid=? [23503-171]<br>
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:128)<br>
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)<br>
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125)<br>
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110)<br>
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:129)<br>
at org.hibernate.engine.jdbc.internal.proxy.AbstractProxyHandler.invoke(AbstractProxyHandler.java:81)<br>
at com.sun.proxy.$Proxy113.executeUpdate(Unknown Source)<br>
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3240)<br>
at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3440)<br>
at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:100)<br>
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)<br>
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)<br>
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:280)<br>
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326)<br>
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52)<br>
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1210)<br>
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:399)<br>
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)<br>
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)<br>
at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.deleteObjectAttempt(SqlRepositoryServiceImpl.java:651)<br>
at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.deleteObject_aroundBody6(SqlRepositoryServiceImpl.java:609)<br>
at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl$AjcClosure7.run(SqlRepositoryServiceImpl.java:1)<br>
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.processRepositoryNdc(MidpointAspect.java:59)<br>
at com.evolveum.midpoint.repo.sql.SqlRepositoryServiceImpl.deleteObject(SqlRepositoryServiceImpl.java:590)<br>
at com.evolveum.midpoint.repo.cache.RepositoryCache.deleteObject_aroundBody12(RepositoryCache.java:249)<br>
at com.evolveum.midpoint.repo.cache.RepositoryCache$AjcClosure13.run(RepositoryCache.java:1)<br>
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.processRepositoryNdc(MidpointAspect.java:59)<br>
at com.evolveum.midpoint.repo.cache.RepositoryCache.deleteObject(RepositoryCache.java:247)<br>
at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.deleteObject_aroundBody12(ProvisioningServiceImpl.java:870)<br>
at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl$AjcClosure13.run(ProvisioningServiceImpl.java:1)<br>
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.processProvisioningNdc(MidpointAspect.java:69)<br>
at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.deleteObject(ProvisioningServiceImpl.java:818)<br>
at com.evolveum.midpoint.model.controller.ModelController.executeChanges_aroundBody2(ModelController.java:363)<br>
at com.evolveum.midpoint.model.controller.ModelController$AjcClosure3.run(ModelController.java:1)<br>
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.processModelNdc(MidpointAspect.java:79)<br>
at com.evolveum.midpoint.model.controller.ModelController.executeChanges(ModelController.java:313)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:606)<br>
at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:434)<br>
at com.sun.proxy.$Proxy7.executeChanges(Unknown Source)<br>
at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList.deleteObjectConfirmedPerformed(PageDebugList.java:515)<br>
at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList.access$3(PageDebugList.java:509)<br>
at com.evolveum.midpoint.web.page.admin.configuration.PageDebugList$1.yesPerformed(PageDebugList.java:141)<br>
at com.evolveum.midpoint.web.component.dialog.ConfirmationDialog$3.onClick(ConfirmationDialog.java:87)<br>
at org.apache.wicket.ajax.markup.html.AjaxLink$1.onEvent(AjaxLink.java:86)<br>
at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:131)<br>
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:603)<br>
at sun.reflect.GeneratedMethodAccessor544.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:606)<br>
at org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:258)<br>
at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)<br>
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:247)<br>
at org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:226)<br>
at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840)<br>
at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)<br>
at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254)<br>
at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211)<br>
at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282)<br>
at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:244)<br>
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)<br>
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:267)<br>
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)<br>
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)<br>
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:125)<br>
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)<br>
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)<br>
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)<br>
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)<br>
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter_aroundBody0(MidPointProfilingServletFilter.java:69)<br>
at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter$AjcClosure1.run(MidPointProfilingServletFilter.java:1)<br>
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:149)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.wrapSubsystem(MidpointAspect.java:169)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.ajc$inlineAccessMethod$com_evolveum_midpoint_util_aspect_MidpointAspect$com_evolveum_midpoint_util_aspect_MidpointAspect$wrapSubsystem(MidpointAspect.java:1)<br>
at com.evolveum.midpoint.util.aspect.MidpointAspect.processWebNdc(MidpointAspect.java:84)<br>
at com.evolveum.midpoint.web.util.MidPointProfilingServletFilter.doFilter(MidPointProfilingServletFilter.java:65)<br>
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)<br>
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)<br>
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)<br>
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)<br>
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)<br>
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)<br>
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)<br>
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)<br>
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:879)<br>
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:617)<br>
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1760)<br>
at java.lang.Thread.run(Thread.java:724)<br>
Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "FK_TRIGGER_OWNER: PUBLIC.M_TRIGGER FOREIGN KEY(OWNER_ID, OWNER_OID) REFERENCES PUBLIC.M_OBJECT(ID, OID) (0, 'f17ab2a1-a6ce-4ad1-b057-6537bfc49cc8')"; SQL statement:<br>
delete from m_object where id=? and oid=? [23503-171]<br>
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)<br>
at org.h2.message.DbException.get(DbException.java:169)<br>
at org.h2.message.DbException.get(DbException.java:146)<br>
at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:414)<br>
at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:431)<br>
at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:307)<br>
at org.h2.table.Table.fireConstraints(Table.java:873)<br>
at org.h2.table.Table.fireAfterRow(Table.java:890)<br>
at org.h2.command.dml.Delete.update(Delete.java:99)<br>
at org.h2.command.CommandContainer.update(CommandContainer.java:75)<br>
at org.h2.command.Command.executeUpdate(Command.java:230)<br>
at org.h2.server.TcpServerThread.process(TcpServerThread.java:334)<br>
at org.h2.server.TcpServerThread.run(TcpServerThread.java:150)<br>
at java.lang.Thread.run(Thread.java:724)</p>
<p style="margin: 0px; display: inline;">at org.h2.engine.SessionRemote.done(SessionRemote.java:568)<br>
at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:181)<br>
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:156)<br>
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:142)<br>
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)<br>
at sun.reflect.GeneratedMethodAccessor407.invoke(Unknown Source)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:606)<br>
at org.hibernate.engine.jdbc.internal.proxy.AbstractStatementProxyHandler.continueInvocation(AbstractStatementProxyHandler.java:122)<br>
... 121 more<br>
</p>
</code></div>
</li></ul>
</div>
</span></li></ul>
</div>
</span></li></ul>
</div>
</li></ul>
</div>
</div>
</li></ul>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF109491" style="direction: ltr;"><font face="Tahoma" size="2" color="#000000"><b>De :</b> midpoint-bounces@lists.evolveum.com [midpoint-bounces@lists.evolveum.com] de la part de Radovan Semancik [radovan.semancik@evolveum.com]<br>
<b>Date d'envoi :</b> 30 septembre 2013 11:15<br>
<b>À :</b> midpoint@lists.evolveum.com<br>
<b>Objet :</b> Re: [midPoint] RE : RE : RE : RE : RE : Namespace problem<br>
</font><br>
</div>
<div></div>
<div>
<div class="moz-cite-prefix">On 09/30/2013 04:10 PM, Belleville-Rioux, Vincent wrote:<br>
</div>
<blockquote type="cite"><style type="text/css" id="owaParaStyle"></style>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>We have about 10k new students each semester and also have about the same number of students that get "offboarded" from some services due to various reasons.</div>
<div><br>
</div>
<div>What we're trying to evaluate is how we could automate such state changes so we can do something like :</div>
<div><br>
</div>
<div>- 1 month before the start of the semester, all students registered to at least one class will get their account created / activated.  A notification message will be sent.</div>
<div><br>
</div>
<div>- 12 months after the end of the last semester where the student had at least one class, the account will be deactivated and a notification message will be sent.</div>
</div>
</blockquote>
<br>
This is quite common scenario both in enterprise and academia. And this was actually a reason to create time-based mappings. Therefore it should work even in v2.2 but the limitation is that is should be applied to the entire account and not just a single role.
 The basic idea is like this:<br>
<br>
MidPoint user will be created in midPoint as soon as we know about such record. E.g. it can be synchronized from HR (or any equivalent academic source system). The key idea is that user's validFrom date will be set to onboarding date (or hire date or sunrise
 date or whateverYouCallIt ;-). The activation administrativeStatus of the user should be empty (null). This will cause that midPoint will compute effective user activation status based on validFrom, validTo and current date.<br>
<br>
Assign any roles to the user, e.g. using an object template. The roles should represent a state of the user as it should look like during semester. You do not need to specify any conditions in the object template mappings nor any conditions in the role outbound
 mappings. The roles can be assigned anytime, even before semester.<br>
<br>
Define a time-based activation mapping for the resources that you want to "pre-provision" or for whose you want to delay de-provisioning. An example is here:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation" target="_blank">
https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation</a> (see "Mapping Time Constraints" section).<br>
<br>
And that's it. Before the semester the user has all the roles, but as the time is before user's validFrom the activation mapping in the resource definitions will not be used and the accounts will not be created. When the semester starts the time passes through
 validFrom. MidPoint detects that (automatically) and the mapping will be evaluated differently. The accounts will get created. And similar mechanism also applies to delayed deprovisioning. The examples are actually slightly more complex than your requirement
 as they are set up to create a disabled account 5 days before onboarding and then enable it right on the onboarding date.<br>
<br>
The current limitation is that this applies to all accounts on the resource. If you want to apply it only to some accounts you have to play with the mapping conditions. This may be tricky but it should work. However, this is not the ideal way how to create
 maintainable system. Therefore we plan couple of improvements:<br>
1: support account types (this is called "intent" in midPoint terminology), e.g. account type "user", "student", "admin", "tester", .... you can specify different mappings for each type. Most of the work on this feature is already done. But nobody stated that
 this is important enough to give us enough motivation to finally complete and test it. :-)<br>
2: support similar time-based mappings in assignment/inducement conditions. In such a case you can specify this behaviour per role. This is slightly more difficult to finish, but still possible.<br>
<br>
<blockquote type="cite">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>The startDate and endDate are properties we can read from an SQL table (but I'm simulating that with a CSV file for now).  I guess we'll have to reconcile at least once a day because that table will have updates to those dates as students use our online
 tools to register / unregister themselves to classes.<br>
</div>
</div>
</blockquote>
<br>
If it is really a DB table and it has a timestamp column you may rely on livesync instead. It is more efficient and much faster. Use reconciliation just as a "last instance" in case that livesync missed something (e.g. due to bug in mapping script, because
 the system was down for a long time, etc.)<br>
MidPoint is designed to use livesync as a primary mechanism as often as possible and use reconciliation only as a "safety net".<br>
<br>
Anyway, unlike some other IDM systems midPoint configuration is almost entirely the same whether you use livesync or reconciliation. Therefore it is easy to experiment with it and fine-tune the setup that works for you.<br>
<br>
<blockquote type="cite">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>We should also have the ability to override those values with other dates like "bannedOn" or "temporaryExtension" :</div>
<div><br>
</div>
<div>The bannedOn date would make any student which has that date as a non-null value be kept inactive for 7 years from that date.</div>
<div><br>
</div>
<div>The temporaryExtension date would make any student account active for 12 months from that date, regardless of the endDate imported from SQL.</div>
</div>
</blockquote>
<br>
Interesting requirement. Really. I quite like it :-) And I guess you can implement this behaviour by using the correct conditions in activation mappings. I quite wonder how "clean" or maintainable the result will be though. Anyway, it is worth trying. And if
 you find that you cannot do it or that it is unreadable and confusing then let me know. Maybe we could think about some way how to improve our mapping code to make it better. Maintainability of the system is very important for me.<br>
<br>
It is also import for you to realize whether these rules apply to users (students as physical persons), to accounts, or to assignments (relation of user to an account). As far as I know it is usual that a person may be a student on faculty X and work on faculty
 Y while the onboarding dates may be different. Then is would be best to store the dates in assignments. If this is the case then midPoint is designed to handle situation like this quite well. The system of "assignments" is designed primarily for this purpose.
 While most of the functionality for assignments is already there some pieces of code may still be missing (e.g. the assignment activation mappings). Therefore it may be best for you to start with a partial solution such as storing the dates in users. This
 can work well for a first phase of your project. And you can work with us to plan the required features in the roadmap so you can have it ready for subsequent phases. IDM projects are not deployed overnight therefore I believe that we can agree on a reasonable
 delivery dates that can work for you.<br>
<br>
<blockquote type="cite">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">
<div>So, as you can see, dates are really useful for our use cases.  I understand that this was added rather quickly to 2.2.  Would you suggest we upgrade our test environment to the latest snapshots and try and follow the development from there on?</div>
</div>
</blockquote>
<br>
Not yet :-) .. if you decide to use time-based activation mappings then it should work well in 2.2. If you find some bug in this part we will fix it in 2.2.1 as this is important feature. If you decide that you need more than activation mappings then there
 is no point to switching to the development branch yet. The code is not yet there. In such a case please let us know and we will figure out when we can deliver that. But I quite believe that activation mappings are almost entirely what you need now. And once
 you have your first version working we can talk about how to improve it in the future.<br>
<br>
<pre class="moz-signature" cols="72">-- 

                                           Radovan Semancik
                                          Software Architect
                                             evolveum.com
</pre>
</div>
</div>
</div>
</div>
</body>
</html>