Project

General

Profile

Actions

Feature #2550

closed

Export+import of a virtual system - empty additional attributes in virtual requests, error when using the "rights" attribute

Added by Alena Peterová over 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Ondrej Husník
Category:
Export Import
Target version:
Start date:
11/02/2020
Due date:
% Done:

100%

Estimated time:
24.00 h
Owner:

Description

Tested on the version 10.4.7

Export + import of a virtual system doesn't create the virtual system with the same attributes (in VsAccount form definition), which leads to some issues when using this imported system.

A) "rights" attribute causes errors when implementing the virtual requests
  • Create a virtual system
  • Export the system
  • Import the system
  • Create 2 roles which assign the system and set some value to the "rights" attribute
  • Assign the roles to a user
  • Mark the virtual request as implemented - not possible, red message "Some error occured on server" appears
    2020-11-02 19:01:58.887 ERROR 4184054 --- [http-nio-8080-exec-2] e.b.i.c.e.ExceptionControllerAdvice.handle : [65338c09-0303-4028-8124-0e5b7883a858] 
    java.lang.IllegalArgumentException: Form attribute [czechidm:virtual-system-basic:eu.bcvsolutions.idm.vs.connector.basic.BasicVirtualConnector:1.0.1:systemId=e88a55cf-f62d-4cb6-92e1-29e904873d19:rights] does not support multivalue, sent [2] values.
            at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService.saveAttributeValues(DefaultFormService.java:592)
            at eu.bcvsolutions.idm.core.eav.service.impl.DefaultFormService.saveValues(DefaultFormService.java:543)
    

Note: Maybe connected to this #2398?

B) additional empty attributes in virtual requests

Workaround: Delete the additional attributes from the VsAccount form definition of the imported system

Attached is the exported ZIP file and the screenshots of the form definition "VsAccount" from both instances. We can see the additional attributes in the imported instance that shouldn't be there.

Note: If we add some new singlevalued attributes different from the default attributes, they are imported correctly


Files

update_vs_request.png (16.8 KB) update_vs_request.png Virtual request on the imported system Alena Peterová, 11/02/2020 05:46 PM
imported_system.png (50.8 KB) imported_system.png VsAccount form definition of the imported system Alena Peterová, 11/02/2020 05:47 PM
virtual_removed_exported.png (43.8 KB) virtual_removed_exported.png VsAccount form definition of the exported system Alena Peterová, 11/02/2020 05:47 PM
virtual-system-with-different.zip (31.7 KB) virtual-system-with-different.zip Alena Peterová, 11/02/2020 05:47 PM

Related issues

Related to IdStory Identity Manager - Feature #2398: When copying default virtual system, multivalued attribute 'rights' is not created as multivalued in its form definitionClosedOndrej Husník07/22/2020

Actions
Actions #1

Updated by Radek Tomiška over 3 years ago

  • Is duplicate of Feature #2398: When copying default virtual system, multivalued attribute 'rights' is not created as multivalued in its form definition added
Actions #2

Updated by Radek Tomiška over 3 years ago

  • Is duplicate of deleted (Feature #2398: When copying default virtual system, multivalued attribute 'rights' is not created as multivalued in its form definition)
Actions #3

Updated by Radek Tomiška over 3 years ago

  • Related to Feature #2398: When copying default virtual system, multivalued attribute 'rights' is not created as multivalued in its form definition added
Actions #4

Updated by Vít Švanda over 3 years ago

Here is the same answer as in case # 2398. The VsAccount definition is part of the VS module and not ACC. By default, System Export exports only data from the ACC module.

What you require is export specifically for virtual systems. The current behavior is not a defect.

Related to this task is the need to export data from multiple modules in a single operation, and this export is not possible now. It's not a problem to implement it, but I'm just illustrating why it wasn't done in the first version (it's not a trivial extension).

Actions #5

Updated by Alena Peterová over 3 years ago

I understand, it's just that I wasn't aware of this limitation. I put it to the wiki: https://wiki.czechidm.com/devel/documentation/adm/export_import#virtual_systems now.

Actions #6

Updated by Radek Tomiška over 3 years ago

  • Tracker changed from Defect to Feature
  • Affected versions deleted (10.4.7)
Actions #7

Updated by Ondrej Husník almost 3 years ago

  • Assignee changed from Vít Švanda to Ondrej Husník
  • Target version set to 11.1.0
Actions #8

Updated by Ondrej Husník almost 3 years ago

  • Estimated time set to 24.00 h
Actions #9

Updated by Ondrej Husník almost 3 years ago

  • Status changed from New to In Progress
Actions #10

Updated by Ondrej Husník almost 3 years ago

Full support of VS export and import has been implemented. The implementation solves both scenarios described in this task.
The first scenario A) "rights" attribute causes errors when implementing the virtual requests is solved by the proper export of VS form definition to the export batch.
The second one B) additional empty attributes in virtual requests was caused by the fact that during the process of VS import there were created all default a attributes in the VsAccount form definition. Attributes which are not listed in the VS configuration are now removed from the VsAccount form definition.

Please could you provide me the feedback?
https://github.com/bcvsolutions/CzechIdMng/commit/6d04116296272436a2fdb517e65b2a1187978a79
https://wiki.czechidm.com/devel/documentation/adm/export_import#virtual_systems

Actions #11

Updated by Ondrej Husník almost 3 years ago

  • % Done changed from 0 to 80
Actions #12

Updated by Ondrej Husník almost 3 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondrej Husník to Vít Švanda
  • % Done changed from 80 to 90
Actions #13

Updated by Vít Švanda over 2 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Ondrej Husník
  • % Done changed from 90 to 100

I did review and tested it. Works awesome, thanks for that.

I found only one minor thing: Please make method SystemExportBulkAction.exportVsDefinition more universal (rename to for example to 'emittExportEvent').

Actions #14

Updated by Ondrej Husník over 2 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondrej Husník to Vít Švanda
Actions #15

Updated by Vít Švanda over 2 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Ondrej Husník
Actions #16

Updated by Radek Tomiška over 2 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF