<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hello MiSo,<br>
      <br>
      the attribute removal in "pure form" seems to be a problem just
      now. I've just created a jira issue for it: <a
        href="https://jira.evolveum.com/browse/MID-2421">https://jira.evolveum.com/browse/MID-2421</a><br>
      <br>
      However, it is possible to create a workaround, putting empty
      string ('') instead of null there. See example in the mentioned
      jira, setting allowEmptyValues parameter to TRUE.<br>
      <br>
      As for your second question, it should be possible to do something
      like this:<br>
      <br>
      oldObject = event.getFocusContext().getObjectOld()<br>
      basic.getExtensionPropertyValue(oldObject, '', INTERNSHIP_NAME)<br>
      <br>
      (I have not actually tried it, but it should work.)<br>
      <br>
      Best regards,<br>
      Pavol<br>
      <br>
      <br>
      On 22. 6. 2015 8:47, Steklac Michal wrote:<br>
    </div>
    <blockquote cite="mid:1434955667.2504.4.camel@steky" type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="GENERATOR" content="GtkHTML/4.6.6">
      Hi,<br>
      <br>
      I have two question:<br>
      1) How can I remove attribute value? I want set value only if
      contains some substring.<br>
      ...<br>
      <inbound><br>
      <strength>strong</strength><br>
      <source><br>
      <path>$account/attributes/job_title</path><br>
      </source><br>
      <expression><br>
      <script><br>
      <language><a moz-do-not-send="true"
href="http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy%3C">http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy<</a>/language><br>
      <code><br>
      String str = 'aaaa';<br>
      String value = job_title;<br>
      if(value.length() &gt; 0 &amp;&amp;
      value.contains(str)){<br>
      return value;<br>
      }<br>
      //return '';<br>
      //return null;<br>
      </code><br>
      </script><br>
      </expression> <br>
      <target><br>
      <path>$user/extension/jobTitle</path><br>
      </target><br>
      </inbound><br>
      ...<br>
      <br>
      2) Can I get in notification old value? I get  new value with<br>
      ...<br>
      INTERNSHIP_NAME = 'internship';<br>
      String internship = basic.getExtensionPropertyValue(requestee, '',
      INTERNSHIP_NAME).toString();<br>
      ...<br>
      <br>
      Thanks,<br>
      MiSo
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>