Task #2348
closedImported system for organizations/contracts has empty type of structure (-> synchronization of organizations ends with Unknown state)
100%
Description
Version 10.3.2
We exported and imported systems for organizations and contracts. All settings and attributes were created successfully, only the tree type was missing:- System for organizations -> Mapping of attributes -> Detail -> Tree type
- System for contracts -> Synchronization -> Specific settings -> Default type of structure
The tree type has the same (default) code "ORGANIZATIONS" in both environments, but their UUID is different, because it's created automatically.
The result of the import seemed OK. (Result: Executed).
Second thing (this is more for future users, if anybody gets to the same situation):
When the synchronization or organizations is started without the tree type, results are "Unknown state":
26.06.2020 14:06:29: Account was not found. We try to find account for UID [672] (generated from the mapped attribute marked as Identifier) ------------------------- 26.06.2020 14:06:29: SystemEntity for this uid doesn't exist. We will create it. ------------------------- 26.06.2020 14:06:29: Account doesn't exist in IdM ------------------------- 26.06.2020 14:06:29: Operation count for [UNKNOWN] is [19] ------------------------- 26.06.2020 14:06:29: Operation count for [UNKNOWN] is [19]Only in the application log, you can see the real reason:
2020-06-26 14:06:29.246 ERROR 225387 --- [base-task-executor-4] e.b.i.a.s.i.AbstractSynchronizationExecutor.loggingException : Synchronization - exception during [UNKNOWN] for UID [672] java.lang.IllegalArgumentException: Tree type cannot be null! at org.springframework.util.Assert.notNull(Assert.java:198) at eu.bcvsolutions.idm.acc.service.impl.TreeSynchronizationExecutor.getEntityFilter(TreeSynchronizationExecutor.java:685)
It would be useful, if this exception was visible in the synchronization log through GUI, or if the synchronization didn't start at all.
Files
Updated by Alena Peterová over 4 years ago
- Subject changed from Imported system for organizations/contracts has empty type of structure (-> synchronization of organizations ends with Unknow state) to Imported system for organizations/contracts has empty type of structure (-> synchronization of organizations ends with Unknown state)
- Description updated (diff)
Updated by Vít Švanda over 4 years ago
- Target version set to 10.5.0
Is it possible that the IdmTreeType with the required code had a different ID than on the source IDM (wasn't imported)?
Updated by Alena Peterová over 4 years ago
Yes, their UUID is different - the default tree type is created automatically when IdM is installed.
Updated by Vít Švanda over 4 years ago
So that is the reason. Searching by code can be (should be) implemented here.
Updated by Vít Švanda over 4 years ago
- Target version changed from 10.5.0 to 10.6.0
Updated by Vít Švanda about 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
- % Done changed from 0 to 90
Export of the system mapping supports advanced paring for tree-type. It means tree-type is not searched only by ID, but also by code too. Tree-type is included in the export now (embedded in the system-mapping DTO). Test was alos created.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/cee7d1a59999e03880713da8bab5c783777b091b
Updated by Radek Tomiška about 4 years ago
- Status changed from Needs feedback to In Progress
- Assignee changed from Radek Tomiška to Vít Švanda
I did test and code review, code is nice and it works awesome in the first part on mapping detail. Could you please add this feature into second part (System for contracts -> Synchronization -> Specific settings -> Default type of structure)?
Updated by Vít Švanda about 4 years ago
- Status changed from In Progress to Needs feedback
- Assignee changed from Vít Švanda to Radek Tomiška
Thanks for the feedback. I missed the second problem.
I implemented advaced paring for tree-type in contract-sync. It was easy. Bigger problem I had with tree-node field. Feature for searching a object on target IdM by complex key (treeType and treeNode code) was never implement in advaced paring. I implemented it. The feature is not universal and works only for tree-nodes.
Beware: If a relation on the tree-node/tree-type will be not found for sync-config, then the whole sync-config will be skipped (not created, not updated).
Wiki updated: https://wiki.czechidm.com/devel/documentation/adm/export_import#systems
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/944fa7c8c6eead549bdfbe2bc14d04abf06d7e76
Note for feedback: Same problem was in the sync of contract-slices ;-).
Updated by Radek Tomiška about 4 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Radek Tomiška to Vít Švanda
- % Done changed from 90 to 100
I did test and code review, it's awesome, thx!
Updated by Radek Tomiška about 4 years ago
- Status changed from Resolved to Closed