[midPoint] remove attr & get old value in notification

Steklac Michal Michal_Steklac at datalan.sk
Mon Jun 22 08:47:47 CEST 2015


Hi,

I have two question:
1) How can I remove attribute value? I want set value only if contains some substring.
...
<inbound>
<strength>strong</strength>
<source>
<path>$account/attributes/job_title</path>
</source>
<expression>
<script>
<language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>
<code>
String str = 'aaaa';
String value = job_title;
if(value.length() > 0 && value.contains(str)){
return value;
}
//return '';
//return null;
</code>
</script>
</expression>
<target>
<path>$user/extension/jobTitle</path>
</target>
</inbound>
...

2) Can I get in notification old value? I get  new value with
...
INTERNSHIP_NAME = 'internship';
String internship = basic.getExtensionPropertyValue(requestee, '', INTERNSHIP_NAME).toString();
...

Thanks,
MiSo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150622/d82af0c2/attachment.htm>


More information about the midPoint mailing list