<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">After a few days of changing it on the live system it is working as expected now with basic.getPropertyValue() in the body expression. I created a JIRA for this,</div><div dir="ltr"><br></div><div dir="ltr">Thanks!<br><br></div></div></div><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">On Fri, Jan 11, 2019 at 8:33 AM Jason Everling <<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thanks, I will give it try because it was still not consistent. I just have to reverse my commit and change to what you suggested. I broke them up into their own handlers so the handler expression filter takes care of it which works 100%. I would rather have a few handlers vs 20-30 individual ones. <div><br><div><div><div dir="ltr" class="gmail-m_9126642636457504653gmail-m_-5776901044466218960gmail_signature"><div dir="ltr"><br></div></div></div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Jan 11, 2019 at 3:25 AM Wojciech Staszewski <<a href="mailto:wojciech.staszewski@diagnostyka.pl" target="_blank">wojciech.staszewski@diagnostyka.pl</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Jason!<br>
<br>
I use "getPropertyValue" instead "getExtensionPropertyValue", because the latter sometimes doesn't work for me.<br>
Something like this:<br>
<br>
basic.getPropertyValue(requestee, "extension/attr1");<br>
<br>
Can you try this?<br>
<br>
Regards,<br>
Wojciech Staszewski<br>
<br>
W dniu 08.01.2019 o 21:11, Jason Everling pisze:<br>
> Seriously, it was the semi-colon for each body expression :/ . 2 hours of fiddling with this, when I wrote the new expressions I must have added it. Why doesn't it work with a semi-colon?<br>
> <br>
> This doesn't work<br>
> <br>
> body = ''<br>
> <br>
> if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a> <<a href="http://the.namespace.com/" rel="noreferrer" target="_blank">http://the.namespace.com/</a>>', 'attr1') == 'someValue') {<br>
> body = "This messege";<br>
> } else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a> <<a href="http://the.namespace.com/" rel="noreferrer" target="_blank">http://the.namespace.com/</a>>', 'attr2') == 'someValue') {<br>
> body = "Different messege";<br>
> } else {<br>
> body = "Last messege";<br>
> }<br>
> <br>
> But this does,<br>
> <br>
> body = ''<br>
> <br>
> if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a> <<a href="http://the.namespace.com/" rel="noreferrer" target="_blank">http://the.namespace.com/</a>>', 'attr1') == 'someValue') {<br>
> body = "This messege"<br>
> } else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a> <<a href="http://the.namespace.com/" rel="noreferrer" target="_blank">http://the.namespace.com/</a>>', 'attr2') == 'someValue') {<br>
> body = "Different messege"<br>
> } else {<br>
> body = "Last messege"<br>
> }<br>
> <br>
> JASON<br>
> <br>
> <br>
> On Tue, Jan 8, 2019 at 1:59 PM Pálos Gustáv <<a href="mailto:gustav.palos@evolveum.com" target="_blank">gustav.palos@evolveum.com</a> <mailto:<a href="mailto:gustav.palos@evolveum.com" target="_blank">gustav.palos@evolveum.com</a>>> wrote:<br>
> <br>
> Hi,<br>
> <br>
> I use the same way to get extension attributes at least in simpleUserNotifier bodyExpression.<br>
> Try to log his value (is not empty?), maybe you have a problem with the comparison, try basic.stringify(...) or equal()...<br>
> <br>
> Best regards,<br>
> <br>
> Gustav<br>
> <br>
> ut 8. 1. 2019 o 20:46 Jason Everling <<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a> <mailto:<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>>> napísal(a):<br>
> <br>
> I was working on updating some ancient notifications we have, streamlining them, and noticed when using an extension attribute it doesn't work or when it sends it sends a blank body even though the attribute values are correct<br>
> <br>
> For example, the below doesn't work in body expression but they work fine in subject expression, is there a different way to do it in body?<br>
> <br>
> body = ''<br>
> <br>
> if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a>', 'attr1') == 'someValue') {<br>
> body = "This messege"<br>
> } else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" rel="noreferrer" target="_blank">http://the.namespace.com</a>', 'attr2') == 'someValue') {<br>
> body = "Different messege"<br>
> } else {<br>
> body = "Last messege"<br>
> }<br>
> _______________________________________________<br>
> midPoint mailing list<br>
> <a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a> <mailto:<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>><br>
> <a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
> <br>
> <br>
> <br>
> -- <br>
> Gustáv Pálos<br>
> Identity Engineer<br>
> <a href="http://evolveum.com" rel="noreferrer" target="_blank">evolveum.com</a> <<a href="http://evolveum.com/" rel="noreferrer" target="_blank">http://evolveum.com/</a>><br>
> _______________________________________________<br>
> midPoint mailing list<br>
> <a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a> <mailto:<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>><br>
> <a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
> <br>
> <br>
> _______________________________________________<br>
> midPoint mailing list<br>
> <a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
> <a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
> <br>
<br>
-- <br>
Wojciech Staszewski<br>
Administrator Systemów Sieciowych<br>
<a href="http://www.diagnostyka.pl" rel="noreferrer" target="_blank">www.diagnostyka.pl</a><br>
Diagnostyka Sp. z o. o.<br>
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków<br>
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)<br>
NIP: 675-12-65-009; REGON: 356366975<br>
Kapitał zakładowy: 33 756 500 zł.<br>
<br>
Pomyśl o środowisku zanim wydrukujesz ten e-mail.<br>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div></div>