<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Dear midPoint community,<div><br></div><div>I am solving strange behaviour of the stored changes in the shadow after resource unavailability. I have following schema and schema handling:</div><div><br></div><div><div><schema></div><div>      <cachingMetadata></div><div>         <retrievalTimestamp>2017-10-17T12:21:25.516+02:00</retrievalTimestamp></div><div>         <serialNumber>590e3d39da93b17a-1039ae8e5b8bdc4e</serialNumber></div><div>      </cachingMetadata></div><div>      <definition></div><div>         <xsd:schema xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"</div><div>                     xmlns:a="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3">http://prism.evolveum.com/xml/ns/public/annotation-3</a>"</div><div>                     xmlns:tns="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>"</div><div>                     xmlns:ra="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3">http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3</a>"</div><div>                     elementFormDefault="qualified"</div><div>                     targetNamespace="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>"></div><div>            <xsd:import namespace="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3">http://prism.evolveum.com/xml/ns/public/annotation-3</a>"/></div><div>            <xsd:import namespace="<a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3">http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3</a>"/></div><div>            <xsd:import namespace="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3">http://midpoint.evolveum.com/xml/ns/public/resource/annotation-3</a>"/></div><div>            <xsd:complexType name="UserAccess"></div><div>               <xsd:annotation></div><div>                  <xsd:appinfo></div><div>                     <ra:resourceObject/></div><div>                     <ra:identifier>icfs:uid</ra:identifier></div><div>                     <ra:secondaryIdentifier>icfs:name</ra:secondaryIdentifier></div><div>                     <ra:displayNameAttribute>icfs:name</ra:displayNameAttribute></div><div>                     <ra:namingAttribute>icfs:name</ra:namingAttribute></div><div>                     <ra:nativeObjectClass>UserAccess</ra:nativeObjectClass></div><div>                  </xsd:appinfo></div><div>               </xsd:annotation></div><div>               <xsd:sequence></div><div>                  <xsd:element minOccurs="0" maxOccurs="unbounded" name="data-subsidiary" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>120</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-subsidiary</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element maxOccurs="unbounded"</div><div>                               minOccurs="0"</div><div>                               name="data-role"</div><div>                               type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>130</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-role</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element ref="icfs:name"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayName>ConnId Name</a:displayName></div><div>                           <a:displayOrder>110</a:displayOrder></div><div>                           <ra:frameworkAttributeName>__NAME__</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="oid" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>140</a:displayOrder></div><div>                           <ra:frameworkAttributeName>oid</ra:frameworkAttributeName></div><div>                           <ra:returnedByDefault>false</ra:returnedByDefault></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="data-email" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>150</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-email</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="data-status" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>155</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-status</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="data-firstName" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>156</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-firstName</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="data-lastName" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>157</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-lastName</ra:frameworkAttributeName></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" name="data-empID" type="xsd:string"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayOrder>159</a:displayOrder></div><div>                           <ra:frameworkAttributeName>data-empID</ra:frameworkAttributeName></div><div>                           <ra:returnedByDefault>false</ra:returnedByDefault></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>                  <xsd:element minOccurs="0" ref="icfs:uid"></div><div>                     <xsd:annotation></div><div>                        <xsd:appinfo></div><div>                           <a:displayName>ConnId UID</a:displayName></div><div>                           <a:displayOrder>100</a:displayOrder></div><div>                           <a:access>read</a:access></div><div>                        </xsd:appinfo></div><div>                     </xsd:annotation></div><div>                  </xsd:element></div><div>               </xsd:sequence></div><div>            </xsd:complexType></div><div><span style="white-space:pre">                   </span>...</div><div>         </xsd:schema></div><div>      </definition></div><div>   </schema></div><div>   <schemaHandling></div><div><span style="white-space:pre">           </span><objectType></div><div><span style="white-space:pre">                    </span><kind>account</kind></div><div><span style="white-space:pre">                      </span><displayName>NetSuite Account</displayName></div><div><span style="white-space:pre">                       </span><default>true</default></div><div><span style="white-space:pre">                   </span><objectClass>ri:UserAccess</objectClass></div><div><span style="white-space:pre">                  </span><attribute></div><div><span style="white-space:pre">                             </span><c:ref>icfs:name</c:ref></div><div><span style="white-space:pre">                          </span><displayName>name</displayName></div><div><span style="white-space:pre">                           </span><outbound></div><div><span style="white-space:pre">                                      </span><strength>strong</strength></div><div><span style="white-space:pre">                                       </span><authoritative>true</authoritative></div><div><span style="white-space:pre">                                       </span><source></div><div><span style="white-space:pre">                                                </span><c:path>$user/givenName</c:path></div><div><span style="white-space:pre">                                  </span></source></div><div><span style="white-space:pre">                                       </span><source></div><div><span style="white-space:pre">                                                </span><c:path>$user/familyName</c:path></div><div><span style="white-space:pre">                                 </span></source></div><div><span style="white-space:pre">                                       </span><expression></div><div><span style="white-space:pre">                                            </span><script></div><div><span style="white-space:pre">                                                        </span><code></div><div><span style="white-space:pre">                                                          </span>return givenName + " " + familyName;</div><div><span style="white-space:pre">                                                        </span></code></div><div><span style="white-space:pre">                                         </span></script></div><div><span style="white-space:pre">                                       </span></expression></div><div><span style="white-space:pre">                           </span></outbound></div><div><span style="white-space:pre">                     </span></attribute></div><div><span style="white-space:pre">                    </span><attribute></div><div><span style="white-space:pre">                             </span><c:ref>ri:data-firstName</c:ref></div><div><span style="white-space:pre">                          </span><displayName>firstName</displayName></div><div><span style="white-space:pre">                              </span><outbound></div><div><span style="white-space:pre">                                      </span><strength>strong</strength></div><div><span style="white-space:pre">                                       </span><authoritative>true</authoritative></div><div><span style="white-space:pre">                                       </span><source></div><div><span style="white-space:pre">                                                </span><c:path>$user/givenName</c:path></div><div><span style="white-space:pre">                                  </span></source></div><div><span style="white-space:pre">                               </span></outbound></div><div><span style="white-space:pre">                     </span></attribute></div><div><span style="white-space:pre">                    </span><attribute></div><div><span style="white-space:pre">                             </span><c:ref>ri:oid</c:ref></div><div><span style="white-space:pre">                             </span><displayName>oid</displayName></div><div><span style="white-space:pre">                            </span><outbound></div><div><span style="white-space:pre">                                      </span><strength>strong</strength></div><div><span style="white-space:pre">                                       </span><expression></div><div><span style="white-space:pre">                                            </span><script></div><div><span style="white-space:pre">                                                        </span><code></div><div><span style="white-space:pre">                                                  </span><a href="http://log.info">log.info</a>("sending NetSuite oid: " + focus.getOid());</div><div><span style="white-space:pre">                                                    </span>return focus.getOid();</div><div><span style="white-space:pre">                                                        </span></code></div><div><span style="white-space:pre">                                         </span></script></div><div><span style="white-space:pre">                                       </span></expression></div><div><span style="white-space:pre">                           </span></outbound></div><div><span style="white-space:pre">                     </span></attribute></div><div><span style="white-space:pre">                    </span><attribute></div><div><span style="white-space:pre">                             </span><c:ref>ri:data-lastName</c:ref></div><div><span style="white-space:pre">                           </span><displayName>lastName</displayName></div><div><span style="white-space:pre">                               </span><outbound></div><div><span style="white-space:pre">                                      </span><strength>strong</strength></div><div><span style="white-space:pre">                                       </span><authoritative>true</authoritative></div><div><span style="white-space:pre">                                       </span><source></div><div><span style="white-space:pre">                                                </span><c:path>$user/familyName</c:path></div><div><span style="white-space:pre">                                 </span></source></div><div><span style="white-space:pre">                               </span></outbound></div><div><span style="white-space:pre">                     </span></attribute></div><div><span style="white-space:pre">                    </span>...</div><div><span style="white-space:pre">           </span></objectType></div><div><span style="white-space:pre">           </span>...</div><div><br></div><div>stored result in shadow looks like this:</div><div>...</div><div><div><result></div><div>      <operation>com.evolveum.midpoint.provisioning.api.ProvisioningService.modifyObject</operation></div><div>      <status>fatal_error</status></div><div>      <params></div><div>         <entry key="options"></div><div>            <paramValue>ProvisioningOperationOptions(force=false)</paramValue></div><div>         </entry></div><div>         <entry key="oid"></div><div>            <paramValue>d422cd22-661c-427c-8f97-8ceb4bc251c3</paramValue></div><div>         </entry></div></div><div>

<span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">         </span> ...</div><div><br></div><div><objectChange> tag doesnt even contain ri:oid change<br></div><div><br></div><div>after recompute and next try to resend shadow changes to the connector midpoint throws the following exception:</div><div><br></div><div>

<span style="color:rgb(51,51,51);font-family:monospace;font-size:11px;white-space:pre-wrap;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">com.evolveum.midpoint.util.exception.SchemaException: Unknown attribute {<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}data-oid">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}data-oid</a> in definition of object class {<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}UserAccess">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3}UserAccess</a>. Original ConnId name: data-oid in resource object identified by Attribute: {Name=__NAME__, Value=[XXX]}
        at com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnIdConvertor.convertToResourceObject(ConnIdConvertor.java:249)
        at com.evolveum.midpoint.provisioning.ucf.impl.connid.ConnectorInstanceConnIdImpl.fetchObject(ConnectorInstanceConnIdImpl.java:1115)
        at com.evolveum.midpoint.provisioning.impl.ResourceObjectReferenceResolver.fetchResourceObject(ResourceObjectReferenceResolver.java:244)
        at com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.fetchResourceObject(ResourceObjectConverter.java:1346)
        at com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.preReadShadow(ResourceObjectConverter.java:852)
        at com.evolveum.midpoint.provisioning.impl.ResourceObjectConverter.modifyResourceObject(ResourceObjectConverter.java:550)
        at com.evolveum.midpoint.provisioning.impl.ShadowCache.modifyShadow(ShadowCache.java:906)
        at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.refreshShadowLegacy(ProvisioningServiceImpl.java:909)
        at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.refreshShadow(ProvisioningServiceImpl.java:876)
        at com.evolveum.midpoint.provisioning.consistency.impl.GenericErrorHandler.handleError(GenericErrorHandler.java:115)
        at com.evolveum.midpoint.provisioning.impl.ShadowCache.handleError(ShadowCache.java:1502)
        at com.evolveum.midpoint.provisioning.impl.ShadowCache.getShadow(ShadowCache.java:316)
        at com.evolveum.midpoint.provisioning.impl.ProvisioningServiceImpl.getObject(ProvisioningServiceImpl.java:240)
        at com.evolveum.midpoint.model.impl.lens.projector.ContextLoader.finishLoadOfProjectionContext(ContextLoader.java:1037)
        at com.evolveum.midpoint.model.impl.lens.projector.ContextLoader.load(ContextLoader.java:178)
        at com.evolveum.midpoint.model.impl.lens.projector.Projector.lambda$projectInternal$0(Projector.java:194)
        at com.evolveum.midpoint.model.impl.lens.LensUtil.partialExecute(LensUtil.java:950)
        at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectInternal(Projector.java:192)
        at com.evolveum.midpoint.model.impl.lens.projector.Projector.projectAllWaves(Projector.java:146)
        at com.evolveum.midpoint.model.impl.controller.ModelInteractionServiceImpl.previewChanges(ModelInteractionServiceImpl.java:299)
        at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:602)
        at com.evolveum.midpoint.web.component.progress.ProgressPanel$14.callWithContextPrepared(ProgressPanel.java:591)
        at com.evolveum.midpoint.web.component.SecurityContextAwareCallable.call(SecurityContextAwareCallable.java:59)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:748)</span> <br></div><div><br></div><div>It seems to like the attribute ri:oid from original update was stored as ri:data-oid (which doesn't exist) in the changes in the shadow. </div><div><br></div><div>Why is that? How does midPoint determine the attribute names in stored changes in shadows? Can the storing of the changes be disabled? I can deal with that through strong attribute mappings.</div><div><br></div><div><br></div><div>Thanks</div><div>Best Regards</div><div>Oskar Butovič</div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p style="color:rgb(0,0,0);font-family:Verdana,Arial,Helvetica,sans-serif;font-size:10px"> </p><table style="font-family:Verdana,Arial,Helvetica,sans-serif;border-collapse:collapse;padding:0px;margin:0px;border-width:0px;border-style:solid;width:500px"><tbody><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:13px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray"><strong>Oskar Butovič</strong><br><span style="font-size:11px;color:rgb(128,128,128);border:0px solid gray">solution architect</span></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;height:11px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray">gsm: [+420] 774 480 101<br>e‑mail: <a href="mailto:oskar.butovic@ami.cz" target="_blank">oskar.butovic@ami.cz</a></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;height:20px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray"><strong>AMI Praha a.s.</strong><br>Pláničkova 11, 162 00 Praha 6</td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;height:11px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray">tel.: [+420] 274 783 239 | web: <a href="http://dtp.ami.cz/www.ami.cz" target="_blank">www.ami.cz</a></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;height:25px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray"><img src="http://www.ami.cz/images/podpis/ami_logo.gif" alt="AMI Praha a.s." style="border: 0px;"></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:11px;width:500px;height:25px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(170,170,170);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray">Textem tohoto e‑mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s. jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.</td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(0,0,0);font-family:Arial,sans-serif;font-size:5px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray"> </td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td style="color:rgb(170,170,170);font-family:Arial,sans-serif;font-size:11px;width:500px;vertical-align:bottom;padding:0px;border:0px solid gray">Tento e‑mail je určen výhradně pro potřeby jeho adresáta/ů a může obsahovat důvěrné nebo osobní informace. Nejste‑li zamýšleným příjemcem, je zakázáno jakékoliv zveřejňování, zprostředkování nebo jiné použití těchto informací. Pokud jste obdrželi e‑mail neoprávněně, informujte o tom prosím odesílatele a vymažte neprodleně všechny kopie tohoto e‑mailu včetně všech jeho příloh. Nakládáním s neoprávněně získanými informacemi se vystavujete riziku právního postihu.<br><br></td></tr></tbody></table></div></div></div></div></div></div></div>
</div></div></div></div></div></div>