Project

General

Profile

Actions

Task #2053

closed

IdentityRoleExpirationTaskExecutor fails if HrEndContractProcess removes the identity role first (and vice versa)

Added by Tomáš Doischer almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Long running task
Target version:
Start date:
02/12/2020
Due date:
% Done:

100%

Estimated time:
Owner:

Description

A user's contract ended and their identity roles were removed by HrEndContractProcess (as they should be). Shortly after that, IdentityRoleExpirationTaskExecutor tried to remove the same roles, which led to IdentityRoleExpirationTaskExecutor failing because HrEndContractProcess removes identity roles asynchronously.

In log, it looks like this:

2020-01-18 00:15:39.187 ERROR 16191 --- [task-executor-4] e.b.i.c.a.e.AbstractEntityEventProcessor : [core:EVENT_EXECUTE_PROCESSOR_FAILED:34605c7f-2e40-4d3a-93b7-828655ede582] Event [ca3865f8-f83a-49f3-bcb6-c5015236a356] failed in processor [role-request-realization-processor]. ({eventId=ca3865f8-f83a-49f3-bcb6-c5015236a356, processor=role-request-realization-processor})
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1

The IdentityRoleExpirationTaskExecutor and HrEndContractProcess shouldn't fail if the identity role it tries to remove no longer exists. Also, we don't think that automatic roles need to be processed by IdentityRoleExpirationTaskExecutor.


Related issues

Related to IdStory Identity Manager - Defect #2637: LRT: IdentityRoleExpirationTaskExecutor process duplicate assigned roles (duplicate role requests are created in the cycle)ClosedRadek Tomiška01/11/2021

Actions
Actions

Also available in: Atom PDF