<div dir="ltr">Hello everybody<div><br></div><div>I am trying to prefill one security question for users. Whenever I set questionAnswer text it tries to add two whole questionAnswer objects. Despite being authoritative, strong and relativity-absolute it doesnt delete any existing values and duplicate the one I am trying to add. </div><div>Interresting is that when I comment out line "resultQuestion.setQuestionAnswer(answerText);" midpoint tries to add only one question answer but it has no answer text obviously.</div><div><br></div><div>I want to create different answer for each user so I havent used simple <value> as expression.</div><div>I am using this mapping:</div><div><br></div><div><div><mapping></div><div>      <name>start date question</name></div><div>      <authoritative>true</authoritative></div><div>      <strength>strong</strength></div><div>      <expression></div><div>         <script></div><div>            <relativityMode>absolute</relativityMode></div><div>            <code></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                         </span>import com.evolveum.midpoint.xml.ns._public.common.common_3.SecurityQuestionAnswerType;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                                </span>import com.evolveum.prism.xml.ns._public.types_3.ProtectedStringType;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                          </span>import java.lang.reflect.*;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                            </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>def resultQuestions = [];</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                              </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>SecurityQuestionAnswerType resultQuestion = new SecurityQuestionAnswerType();</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                          </span>resultQuestion.setQuestionIdentifier("<a href="http://midpoint.evolveum.com/xml/ns/public/security/question-2#q001">http://midpoint.evolveum.com/xml/ns/public/security/question-2#q001</a>");</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                         </span>ProtectedStringType answerText = basic.encrypt("2.2.2016");</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                          </span>resultQuestion.setQuestionAnswer(answerText);</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                          </span>resultQuestions &lt;&lt; resultQuestion;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                               </span>return resultQuestions;</div><div>            </code></div><div>         </script></div><div>      </expression></div><div>      <target></div><div>         <c:path>credentials/securityQuestions/questionAnswer</c:path></div><div>      </target></div><div>   </mapping></div><div><br></div><div>this is result of preview:</div><div><img src="cid:ii_iu71r5wz0_157b96bd5b1ab3db" width="527" height="196"><br>​<br></div><div>Am I doing something wrong in mapping? Could security question answers be prepared by some other way?</div><div><br></div><div>Best Regards</div><div><br></div><div>Oskar Butovič</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><table style="font-family:verdana,arial,helvetica,sans-serif;border-collapse:collapse;padding:0px;margin:0px;border-width:0px;border-style:solid;width:482px"><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:11px;width:160px;vertical-align:bottom;padding:0px;border:0px solid gray"><p><span style="font-size:14px;font-weight:bold">Oskar Butovič</span><br>solution architect<br><br>gsm: [+420] 774 480 101<br>e-mail: <a href="mailto:oskar.butovic@ami.cz" target="_blank">oskar.butovic@ami.cz</a></p></td><td style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;border-width:0px 1px 0px 0px;border-style:solid;border-color:gray rgb(204,204,204) gray gray;padding:0px">   </td><td style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray">   </td><td style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px;vertical-align:bottom;padding:0px;width:123px;border:0px solid gray"><p>AMI Praha a.s.<br>Pláničkova 11<br>162 00 Praha 6<br>tel.: [+420] 274 783 239<br>web: <a href="http://www.ami.cz/" target="_blank">www.ami.cz</a></p></td><td style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;border-width:0px 1px 0px 0px;border-style:solid;border-color:gray rgb(204,204,204) gray gray;padding:0px">   </td><td style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;border:0px solid gray">   </td><td style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:11px;margin:8px;width:116px;border:0px solid gray"><p><img src="http://www.ami.cz/images/podpis/ami_logo.gif" alt="AMI Praha a.s." style="border: 0px;"></p></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td colspan="7" style="color:rgb(0,0,0);font-family:verdana,arial,helvetica,sans-serif;font-size:10px;padding:0px;width:480px;border:0px solid gray"><br><a href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management" target="_blank"><img src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png" alt="AMI Praha a.s." style="border: 0px; width: 480px; height: 82px;"></a></td></tr><tr style="padding:0px;margin:0px;border:0px solid gray"><td colspan="7" style="color:rgb(128,128,128);font-family:arial,sans-serif;font-size:11px;padding:0px;border:0px solid gray"><br>Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za společnost AMI Praha a.s.<br>jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně písemnou formu.<br><br></td></tr></tbody></table></div></div></div></div></div></div></div>
</div></div>