Project

General

Profile

Actions

Defect #1961

closed

Occasional duplicated automatic role assignment

Added by Petr Michal about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Radek Tomiška
Category:
Automatic roles
Target version:
Start date:
11/27/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Sometimes automatic role assignment is duplicated (probably it only happens with roles for attributes).

From this duplication automatic roles feature does not work. The problem occurs randomly in weeks.

Also there is a chance that the problem is due to project implementation.


Files

auto_roles_error.png (167 KB) auto_roles_error.png Petr Michal, 11/27/2019 03:42 PM

Related issues

Related to IdStory Identity Manager - Task #1968: Prevent to try assign duplicated automatic rolesNewRadek Tomiška11/29/2019

Actions
Related to IdStory Identity Manager - Defect #1840: Duplicities in processed automatic roles and processed items from LongRunningTaskRejectedRadek Tomiška09/06/2019

Actions
Related to IdStory Identity Manager - Defect #2305: Automatic role by tree structure: contract and position cannot assign the same automatic roleClosedRadek Tomiška06/08/2020

Actions
Actions #1

Updated by Petr Michal about 5 years ago

Actions #4

Updated by Radek Tomiška about 5 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Radek Tomiška about 5 years ago

  • % Done changed from 0 to 30

The duplicated assigned role is cretated by two scheduled LRT:
- SelectCurrentContractSliceTaskExecutor - publishes NOTIFY event for the contract => asynchronous automatic roles recount is called
- ProcessAllAutomaticRoleByAttributeTaskExecutor => synchronous automatic roles recount is called.

If the first asynchronous attempt to add automatic roles is executed after the second, but synchronous, attempt => duplicity is created.

Workaround for this issue is switch order of procesing of this LRT => ProcessAllAutomaticRoleByAttributeTaskExecutor should be scheduled before SelectCurrentContractSliceTaskExecutor.

Final solution, which will not depend on the schedule above:
- constraint will be added directly into database (referential integrity) - this will prevent to create duplicate.
- Redesign both task to be synchronous or asynchronous (both LRT cannot process one resource in the same time) - whis will prevent to attempt create duplicate.

Actions #6

Updated by Radek Tomiška about 5 years ago

  • Related to Task #1968: Prevent to try assign duplicated automatic roles added
Actions #7

Updated by Radek Tomiška about 5 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 30 to 90

Constraint added, tested on all supported databases, commit:
https://github.com/bcvsolutions/CzechIdMng/commit/7103879e6a4e1fee4b1b8a673b7c31676a088423

Could you do a feedback, please?

Actions #8

Updated by Vít Švanda about 5 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 90 to 100

I did review and unique constraint was created successfuly. Thanks for that.

Actions #9

Updated by Radek Tomiška about 5 years ago

  • Status changed from Resolved to Closed
Actions #10

Updated by Radek Tomiška almost 5 years ago

  • Related to Defect #1840: Duplicities in processed automatic roles and processed items from LongRunningTask added
Actions #11

Updated by Radek Tomiška over 4 years ago

  • Related to Defect #2305: Automatic role by tree structure: contract and position cannot assign the same automatic role added
Actions

Also available in: Atom PDF