Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial:adm:roles_-_import_data_from_csv [2019/06/10 10:20]
hanakp
tutorial:adm:roles_-_import_data_from_csv [2019/07/09 06:56]
doischert
Line 1: Line 1:
 ====== Roles - Import of data from CSV ====== ====== Roles - Import of data from CSV ======
  
-==== Prepare CSV file ====+===== 1a. Prepare some virtual system =====
  
-Here is an example of CSV file which can be used for import roles.+Please use [[tutorial:adm:how_to_create_virtual_system|this]] tutorial to do so! 
 + 
 +==== 1b. Prepare CSV file ==== 
 + 
 +Here is an example of CSV file which can be used for importing (or updating) roles and set their role attributes.
  
 <code> <code>
-roles;description +roles;description;attribute 
-Manager;Some role description +Manager-A;Leader
-"MASTER RO +LAY-SP;Manager;attr1 
-PAY-OP +"CORE-CLOSE 
-PAY-SP +AB-role";desc;attr1
-PAY-BLL +
-AMT-BLK +
-ACC-CLOSE";Some roles description+
 </code> </code>
  
-As you can see roles column can be single or multivalued. For multivalued roles, description will be added to every role.+As you can see roles column can contain single or multiple values (separated by a line; the separator can be specified in the settings of the LRT). For multivalued roles, description and attribute from the same row will be added to every role
 +CSV file can have optional number of columns, role, description, and attribute columns are specified in setup of LRT.
  
 ==== Create new LongRunningTask ==== ==== Create new LongRunningTask ====
  
-Now we will create the new LongRunningTask(LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green "Add" button to add new LRT.+Now we will create the new LongRunningTask (LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green "Add" button to add new LRT. 
 + 
 +{{ :tutorial:adm:03_scheduler.png?direct&1200 |}}
  
 ==== Fill all attributes ==== ==== Fill all attributes ====
Line 28: Line 32:
 - Task type - **ImportRolesFromCSVExecutor** - Task type - **ImportRolesFromCSVExecutor**
 - Import csv file - dropzone to select or drop csv file - Import csv file - dropzone to select or drop csv file
-- Column with roles - Name of the column with roles +- Column with roles - Name of the column with roles in csv file 
-- Column with description - name of the column with role description +- Column with description - name of the column with role description, can be also used to update description 
-- Column separator - separator of columns in csv +- Column with attributes - name of the column with role attributes, can be also used to update attributes 
-- Multi value separator - separator of multi value values in csv+- Form definition code - the code for the definition which will contain the added attributes 
 +- Column separator - separator of columns in csv file (default ; ) 
 +- Multi value separator - (Char, default: new line) separator of multi valued role names in the csv file, new line separator is default export from excel, but for better clarity of the csv file, it's recommended to use some symbol instead
 - System name - name of the system to connect with roles - System name - name of the system to connect with roles
-- MemberOf attribute name - ( default: rights ) - name of multi valued attribute for merge +- MemberOf attribute name - (default: rights) - name of multi valued attribute for merge, attribute named "rights" is automatically created on every virtual system, but you can create your own and change setup of LRT 
-- Can be requested - ( Boolean ) - Fills can be requested+- Can be requested - (Boolean) - Fills can be requested, can be also used to update already imported settings 
 + 
 +<note important>If you are updating the roles, make sure to set the same form definition the role already have. Also, each role can only have one definition, so if you by mistake set a different definition in the LRT configuration, you will without any doubt get an error. Generally, DO NOT use this LRT to change the definition of a role. You can only change the definition if the role has no attributes set yet.</note> 
 + 
 +{{ :tutorial:adm:01_conflrt.png?direct&600 |}} 
 +{{ :tutorial:adm:02_conflrt2.png?direct&600 |}}
  
 ==== Run the task ==== ==== Run the task ====
  
-Now we just need to hit run +Now we just need to hit run
-You can check status about created roles in All tasks panel in task detail.+ 
 +{{:tutorial:adm:aaaaaaaa6.png?100|}} 
 + 
 +You can check the status of the created roles in the "all taskspanel in the task detail. Here you can find information about roles created, updated, or already existing. 
 + 
 +At this point, everything should be set up and when the task ends, roles are imported in IdM with their attributes, placed in the catalogue named by the system name. 
 + 
 +{{ :tutorial:adm:04_resultrole.png?direct&1200 |}} 
 + 
 +==== Known issues ==== 
 + 
 +If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. 
  • by apeterova