<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="GENERATOR" content="GtkHTML/4.6.6">
</head>
<body>
Hi,<br>
<br>
I made an example in which obtains the value of the attribute family name and attribute internship. Attribute value family name received. When I trying to get the value for attribute internship, then I get null.<br>
<br>
----------------------------------------------------------------------<br>
* code to get family name<br>
...<br>
def NS_FOO = '<a href="http://midpoint.evolveum.com/xml/ns/test/foo-1.xsd';">http://midpoint.evolveum.com/xml/ns/test/foo-1.xsd';</a><br>
delta = ObjectDelta.summarize(((ModelEvent) event).getUserDeltas()); <br>
if(delta != null){<br>
log.info("delta = " + delta.toString());<br>
QName USER_FAMILYNAME_QNAME = new QName(NS_FOO,"familyName");<br>
if(delta.findPropertyDelta(USER_FAMILYNAME_QNAME)!=null){<br>
log.info("familyname="+requestee.getFamilyName());    <br>
}<br>
}<br>
...<br>
* output<br>
...<br>
2015-05-03 15:24:43,391 [RESOURCEOBJECTCHANGELISTENER] [midPointScheduler_Worker-5] INFO (com.evolveum.midpoint.expression): delta = ObjectDelta(UserType:cbd8aee0-802e-43ef-a1c7-30cb79c811f0,MODIFY: Property<br>
Delta( / fullName, REPLACE), PropertyDelta( / familyName, REPLACE), PropertyDelta(metadata / {.../common/common-3}modifyChannel, REPLACE), PropertyDelta(metadata / {.../common/common-3}modifyTimestamp, REPLA<br>
CE), ReferenceDelta(metadata / {.../common/common-3}modifierRef, REPLACE))<br>
2015-05-03 15:24:43,397 [RESOURCEOBJECTCHANGELISTENER] [midPointScheduler_Worker-5] INFO (com.evolveum.midpoint.expression): familyname=Malá<br>
...<br>
----------------------------------------------------------------------<br>
<br>
----------------------------------------------------------------------<br>
* code to get intership, which is extension attribute<br>
...<br>
def NS_FOO = '<a href="http://midpoint.evolveum.com/xml/ns/test/foo-1.xsd';">http://midpoint.evolveum.com/xml/ns/test/foo-1.xsd';</a><br>
delta = ObjectDelta.summarize(((ModelEvent) event).getUserDeltas()); <br>
if(delta != null){<br>
log.info("delta = " + delta.toString());<br>
QName USER_INTERNSHIP_QNAME = new QName(NS_FOO, "internship", "extension");<br>
log.info("delta.findPropertyDelta(USER_INTERNSHIP_QNAME)!=null    " + (delta.findPropertyDelta(USER_INTERNSHIP_QNAME)!=null).toString());<br>
if(delta.findPropertyDelta(USER_INTERNSHIP_QNAME)!=null){<br>
log.info("internship="+basic.getExtensionPropertyValue(requestee, '<a href="http://evolveum.com/my',">http://evolveum.com/my',</a> 'internship'));
<br>
}<br>
}<br>
...                    <br>
* output<br>
...<br>
2015-05-03 15:32:57,490 [RESOURCEOBJECTCHANGELISTENER] [midPointScheduler_Worker-4] INFO (com.evolveum.midpoint.expression): delta = ObjectDelta(UserType:cbd8aee0-802e-43ef-a1c7-30cb79c811f0,MODIFY: Property<br>
Delta(extension / internship, REPLACE), PropertyDelta(metadata / {.../common/common-3}modifyChannel, REPLACE), PropertyDelta(metadata / {.../common/common-3}modifyTimestamp, REPLACE), ReferenceDelta(metadata<br>
/ {.../common/common-3}modifierRef, REPLACE))<br>
2015-05-03 15:32:57,491 [RESOURCEOBJECTCHANGELISTENER] [midPointScheduler_Worker-4] INFO (com.evolveum.midpoint.expression): delta.findPropertyDelta(USER_INTERNSHIP_QNAME)!=null    false<br>
...<br>
----------------------------------------------------------------------<br>
<br>
Please tell me what I'm doing wrong.<br>
<br>
Thanks,<br>
Miso<br>
<br>
On So, 2015-05-02 at 20:51 +0000, Steklac Michal wrote:<br>
<blockquote type="CITE">Hi,<br>
<br>
i have extend schema with attribute internship. It is possible get their value in notification.<br>
<br>
This works for me for attribute givenName<br>
...<br>
QName USER_GIVENNAME_QNAME = new QName(NS_FOO,"givenName");<br>
    if(delta.findPropertyDelta(USER_GIVENNAME_QNAME)!=null){<br>
    attr = attr+'\nmeno='+requestee.getGivenName(); <br>
}<br>
...<br>
<br>
Thanks<br>
MiSo<br>
</blockquote>
<br>
</body>
</html>