Defect #3142
closedRemoving auto role by attribute definition fail, because no transaction is open
100%
Description
When you have some auto role byt attribute. This role is not assigned to anybody.
When you try to remove this definition it failed, because no transaction is open.
workaround is to run RemoveAutomaticRoleTaskExecutor from scheduler to the specific role.
Find what is causing the issue and fix it
Updated by Roman Kučera over 2 years ago
- % Done changed from 0 to 60
Implemented in https://github.com/bcvsolutions/CzechIdMng/tree/kucerar/3142-auto-role-remove-transaction
The solution is enabling load time weaving and AspectJ proxy mode for main datasource.
Other workaround which worked is calling LRT directly in controller instead of service.
I also tried a lot of variants with different transactional annotation, with or without nested transaction turned on. But nothing worked.
Updated by Tomáš Doischer over 2 years ago
- Sprint set to Sprint 12.3-1 (srp 03 - srp 17)
Updated by Tomáš Doischer over 2 years ago
- Sprint changed from Sprint 12.3-1 (srp 03 - srp 17) to Sprint 12.3-2 (srp 17 - srp 31)
Updated by Roman Kučera over 2 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Tomáš Doischer
- % Done changed from 60 to 80
PR https://github.com/bcvsolutions/CzechIdMng/pull/252
After discussion, the solution is via calling LRT directly. This make the whole process of deleting more simple.
AspetJ solution could potentially break some other stuff so we backed of from this solution.
@doischert could you make a review please?
Github action is running.
Updated by Tomáš Doischer over 2 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Tomáš Doischer to Roman Kučera
I tested the workaround and it has a major issue: the removal of the automatic role is not audited. Can you take a look at it again?
Updated by Roman Kučera over 2 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Roman Kučera to Tomáš Doischer
@doischert I reworked the solution. Requests are used now again. Check PR please
Updated by Tomáš Doischer over 2 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Tomáš Doischer to Roman Kučera
- % Done changed from 80 to 100
Thank you, LGTM. Merged to develop.
Updated by Tomáš Doischer almost 2 years ago
- Status changed from Resolved to Closed