Project

General

Profile

Actions

Defect #1727

closed

Failed event during manual contract end with automatic roles

Added by Alena Peterová over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Automatic roles
Target version:
Start date:
06/21/2019
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Tested on 9.6.4 and 9.7.0-SNAPSHOT
Situation:
  • identity has automatic role by attribute or by organization
  • the contract is manually ended (by setting valid to)
  • IdmIdentityContract UPDATE event ends with the attached exception

The role is removed, so it seems that only problem on 9.7.0 is the error in the event.

But on version 9.6.4, when it is automatic role by attribute, there is no failed event, but Audit - Requests for roles - can't be displayed with the exception:

org.springframework.orm.jpa.JpaObjectRetrievalFailureException: Unable to find eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole with id ad8b8a02-8abe-4a60-94c1-61ce22a5161a; nested exception is javax.persistence.EntityNotFoundException: Unable to find eu.bcvsolutions.idm.core.model.entity.IdmIdentityRole with id ad8b8a02-8abe-4a60-94c1-61ce22a5161a

So on 9.6.4 the problem probably affects data consistency.

(I tested only manual contract end, I didn't test contract end by HR process.)


Files


Related issues

Related to IdStory Identity Manager - Task #1700: Optimisation of manual contract endClosedRadek Tomiška05/29/2019

Actions
Actions #1

Updated by Alena Peterová over 5 years ago

  • Related to Task #1700: Optimisation of manual contract end added
Actions #2

Updated by Radek Tomiška over 5 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška
Actions #3

Updated by Radek Tomiška over 5 years ago

When role was removed synchronously, then all assigned roles were removed in the same time (direct, automatic, sub roles). Now automatic roles are recounted before asynchronous request is processed => request cannot remove automatic roles and sub roles now => three asychronous processes have to be executed for successfull role removal now, will be fixed :/.

Actions #4

Updated by Radek Tomiška over 5 years ago

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

I checked processors for automatic roles and I fixed it an other way, which was already prepared for automatic roles by tree structure - invalid contracts are ignored, when automatic roles are processed. I implemented it for all automatic role processors => just one asynchronous role request is executed to role removal.

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/7a2490852cf2f3b6532565f211cac1def63ca21b

Could you do a feedback, please?

Actions #5

Updated by Vít Švanda over 5 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Radek Tomiška
Actions #6

Updated by Vít Švanda over 5 years ago

Works correctly, but after I set validFrom of contract to the past, two role request were generated. First for remove all direct and automatic roles and second for update the automatic role (assigned by tree node). The second request is redundant.

Actions #7

Updated by Radek Tomiška over 5 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 90 to 100

We did another tests and is not reproducible any more., even when more direct roles are removed.

Actions

Also available in: Atom PDF