Defect #2149
closedNotification about account creation is sent even if the operation fails
100%
Description
Tested on version 10.1.0
When creation of the account fails on the system, notification about account creation with the password (acc:newPassword, provisioning-send-notification-processor) is sent, but it shouldn't be. Also when this operation is retried and it fails again, the notification is sent again.
- some constraint in DB fails
- value too long for a column in DB
Updated by Vít Švanda over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 0 to 90
Fixed. Problem was in the processor that sending a notification. I added check on state of provisioning operation. Notification is send only if provisioning operation result is in the state "EXECUTED" now.
I created tests for this case.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/5a5013a45c80c235dc1eeee2280ad197f26260b1
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Vít Švanda
I did code review, new condition should be moved to overriden AbstractEntityEventProcessor#conditional(EntityEvent) method instead.
Support method is used mainly for processor registration + with conditional method usage is not needed to cast content type.
Updated by Vít Švanda over 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
I agree, the conditional method is better choice.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/2f7760fe00e5039cd6c4fd7de6ca3a6730e66667
Updated by Radek Tomiška over 4 years ago
- Status changed from Needs feedback to Closed
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I did test and review, it's awesome, thx!