[midPoint] cannot use extensions in notification body?
Jason Everling
jeverling at bshp.edu
Mon Jan 14 20:20:09 CET 2019
I
JASON
On Fri, Jan 11, 2019 at 8:33 AM Jason Everling <jeverling at bshp.edu> wrote:
> 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.
>
>
>
>
> On Fri, Jan 11, 2019 at 3:25 AM Wojciech Staszewski <
> wojciech.staszewski at diagnostyka.pl> wrote:
>
>> 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.
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190114/acbe1726/attachment.htm>
More information about the midPoint
mailing list