Project

General

Profile

Actions

Task #1024

closed

Fix getting embedded attribute (roleTreeNode) from identity role

Added by Ondřej Kopr over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondřej Kopr
Category:
Roles
Target version:
Start date:
03/12/2018
Due date:
% Done:

100%

Estimated time:
Owner:

Description

Processor IdentityContractUpdateByAutomaticRoleProcessor throws error while update contract and user hasn't automatic role. See exception:

java.lang.IllegalArgumentException: Embedded dto with key [roleTreeNode] not found in given dto [eu.bcvsolutions.idm.core.api.dto.IdmIdentityRoleDto[ id=f6ba6615-becc-40b1-8020-7d46c65b805c ]]
    at eu.bcvsolutions.idm.core.api.utils.DtoUtils.getEmbedded(DtoUtils.java:31)
    at eu.bcvsolutions.idm.core.model.event.processor.contract.IdentityContractUpdateByAutomaticRoleProcessor.lambda$0(IdentityContractUpdateByAutomaticRoleProcessor.java:92)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at eu.bcvsolutions.idm.core.model.event.processor.contract.IdentityContractUpdateByAutomaticRoleProcessor.process(IdentityContractUpdateByAutomaticRoleProcessor.java:97)
Actions #1

Updated by Ondřej Kopr over 6 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Ondřej Kopr over 6 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondřej Kopr to Radek Tomiška
  • % Done changed from 0 to 90

Thanks Radek for report this bug. I fixed this and also add test for check save contract without automatic roles.

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/c9b734723b6def6467a0704983d4c845ea002aae (branches: develop, hotfix/7.8.4)

Please Radek could you made a review? Thank you.

Actions #3

Updated by Radek Tomiška over 6 years ago

  • Status changed from Needs feedback to Closed
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • % Done changed from 90 to 100

I did test and review, it's ok, thx.

Actions

Also available in: Atom PDF