<div dir="ltr">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?<div><br></div><div>This doesn't work</div><div><br></div><div><div>body = ''</div><div><br></div><div>if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com/" target="_blank">http://the.namespace.com</a>', 'attr1') == 'someValue') {</div><div>    body = "This messege";</div><div>} else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com/" target="_blank">http://the.namespace.com</a>', 'attr2') == 'someValue') {</div><div>   body = "Different messege";</div><div>} else {</div><div>   body = "Last messege";</div><div>}</div></div><div><br></div><div>But this does,</div><div><br></div><div><div>body = ''</div><div><br></div><div>if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com/" target="_blank">http://the.namespace.com</a>', 'attr1') == 'someValue') {</div><div>    body = "This messege"</div><div>} else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com/" target="_blank">http://the.namespace.com</a>', 'attr2') == 'someValue') {</div><div>   body = "Different messege"</div><div>} else {</div><div>   body = "Last messege"</div><div>}</div></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">JASON</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 8, 2019 at 1:59 PM Pálos Gustáv <<a href="mailto:gustav.palos@evolveum.com">gustav.palos@evolveum.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>I use the same way to get extension attributes at least in simpleUserNotifier bodyExpression. </div><div>Try to log his value (is not empty?), maybe you have a problem with the comparison, try basic.stringify(...) or equal()...</div><div><br></div><div>Best regards,</div><div><br></div><div>Gustav</div><br><div class="gmail_quote"><div dir="ltr">ut 8. 1. 2019 o 20:46 Jason Everling <<a href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>> napísal(a):<br></div><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"><div dir="ltr">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<div><br></div><div>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?</div><div><br></div><div>body = ''</div><div><br></div><div>if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" target="_blank">http://the.namespace.com</a>', 'attr1') == 'someValue') {</div><div>    body = "This messege"</div><div>} else if (basic.getExtensionPropertyValue(requestee, '<a href="http://the.namespace.com" target="_blank">http://the.namespace.com</a>', 'attr2') == 'someValue') {</div><div>   body = "Different messege"</div><div>} else {</div><div>   body = "Last messege"</div><div>}</div></div></div>
_______________________________________________<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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_5763273520528616456gmail_signature"><div dir="ltr"><div>Gustáv Pálos</div><div>Identity Engineer</div><a href="http://evolveum.com/" rel="noreferrer" style="color:rgb(17,85,204);font-size:12.8px" target="_blank">evolveum.com</a><br></div></div></div></div></div></div>
_______________________________________________<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>