Project

General

Profile

Actions

Task #509

closed

Cannot override notification level

Added by Jan Helbich almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Notification
Target version:
Start date:
06/13/2017
Due date:
% Done:

100%

Estimated time:
4.00 h
Owner:

Description

In our project (running 7.3.0-rc2) we have declared an email topic with INFO level (NotificationLevel.INFO).
When we try to send a message into this topic without specifying a notification level, everything works just fine.
But setting a new notification level somehow result in silent failure. There is no error in the log, no message on FE, nothing.

Example of working notification send:

    notificationManager.send(
            "mytopic",
            new IdmMessageDto.Builder()
                    .addParameter("param1", orgType)
                    .addParameter("entity", orgEntity)
                    .build(),
            recipients
    )

Example of failing code:

    notificationManager.send(
             "mytopic",
            new IdmMessageDto.Builder()
                    .setLevel(NotificationLevel.SUCCESS)
                    .addParameter("param1", orgType)
                    .addParameter("entity", orgEntity)
                    .build(),
            recipients
    )

If such feature is not supported (though I don't see a reason why), please at least handle the error appropriately.

If notification are sent from FE test page, then console sender is used all time.

Actions #1

Updated by Vít Švanda over 6 years ago

  • Target version deleted (Diamond (7.4.0))
Actions #2

Updated by Radek Tomiška over 6 years ago

  • Description updated (diff)
  • Estimated time set to 4.00 h
Actions #3

Updated by Radek Tomiška over 6 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Radek Tomiška to Vít Švanda
  • Target version set to Forsterite (7.6.0)
  • % Done changed from 0 to 90

I fixed sending notification from FE and created integration test for UC above.
When notification configuration with topic and NotificationLevel.INFO is created, the this configuration works only for messages, which are sent to this topic with level NotificationLevel.INFO. Configuration cannot be found for any other levels and then is message simply sent to console sender as fallback - this notification can be found in FE agenda. A proper way is to configure topic for all notification levels (wildcard), so topic will intercept messages with any level.

Ii added some unit test for override message level too - there was bug, when model was given, then default NotificationLevel.INFO was used (fixed).

Could you pls do a review?

Actions #4

Updated by Vít Švanda over 6 years ago

  • Assignee changed from Vít Švanda to Ondřej Kopr
Actions #5

Updated by Ondřej Kopr over 6 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 90 to 100

I did feedback (commit: https://github.com/bcvsolutions/CzechIdMng/commit/7cb41c9c8f72e4410366b7c121e0089652118c21) i checked new behavior on ProvisioningSendNotificationProcessor, i change level and this change works.

I also tried override notification level trough send notification (send notification to some existing topic with level) trough FE agenda and also everything works awesome, thank you.

From now is possible change notification level, thank you. New tests are also good

Actions #6

Updated by Radek Tomiška over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF