[midPoint] cannot use extensions in notification body?

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Fri Jan 11 10:24:59 CET 2019


Hi Jason!

I use "getPropertyValue" instead "getExtensionPropertyValue", because the latter sometimes doesn't work for me.
Something like this:

basic.getPropertyValue(requestee, "extension/attr1");

Can you try this?

Regards,
Wojciech Staszewski

W dniu 08.01.2019 o 21:11, Jason Everling pisze:
> 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?
> 
> This doesn't work
> 
> body = ''
> 
> if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com <http://the.namespace.com/>', 'attr1') == 'someValue') {
>      body = "This messege";
> } else if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com <http://the.namespace.com/>', 'attr2') == 'someValue') {
>     body = "Different messege";
> } else {
>     body = "Last messege";
> }
> 
> But this does,
> 
> body = ''
> 
> if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com <http://the.namespace.com/>', 'attr1') == 'someValue') {
>      body = "This messege"
> } else if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com <http://the.namespace.com/>', 'attr2') == 'someValue') {
>     body = "Different messege"
> } else {
>     body = "Last messege"
> }
> 
> JASON
> 
> 
> On Tue, Jan 8, 2019 at 1:59 PM Pálos Gustáv <gustav.palos at evolveum.com <mailto:gustav.palos at evolveum.com>> wrote:
> 
>     Hi,
> 
>     I use the same way to get extension attributes at least in simpleUserNotifier bodyExpression.
>     Try to log his value (is not empty?), maybe you have a problem with the comparison, try basic.stringify(...) or equal()...
> 
>     Best regards,
> 
>     Gustav
> 
>     ut 8. 1. 2019 o 20:46 Jason Everling <jeverling at bshp.edu <mailto:jeverling at bshp.edu>> napísal(a):
> 
>         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
> 
>         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?
> 
>         body = ''
> 
>         if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com', 'attr1') == 'someValue') {
>              body = "This messege"
>         } else if (basic.getExtensionPropertyValue(requestee, 'http://the.namespace.com', 'attr2') == 'someValue') {
>             body = "Different messege"
>         } else {
>             body = "Last messege"
>         }
>         _______________________________________________
>         midPoint mailing list
>         midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>         http://lists.evolveum.com/mailman/listinfo/midpoint
> 
> 
> 
>     -- 
>     Gustáv Pálos
>     Identity Engineer
>     evolveum.com <http://evolveum.com/>
>     _______________________________________________
>     midPoint mailing list
>     midPoint at lists.evolveum.com <mailto:midPoint at lists.evolveum.com>
>     http://lists.evolveum.com/mailman/listinfo/midpoint
> 
> 
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
> 

-- 
Wojciech Staszewski
Administrator Systemów Sieciowych
www.diagnostyka.pl
Diagnostyka Sp. z o. o.
ul. Prof. M. Życzkowskiego 16, 31-864 Kraków
Numer KRS: 0000381559 (Sąd Rejonowy dla Krakowa-Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS)
NIP: 675-12-65-009; REGON: 356366975
Kapitał zakładowy: 33 756 500 zł.

Pomyśl o środowisku zanim wydrukujesz ten e-mail.



More information about the midPoint mailing list