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
tutorial:adm:automatic_role_definitions_-_import_of_data_from_csv [2019/11/07 13:31]
doischert
tutorial:adm:automatic_role_definitions_-_import_of_data_from_csv [2020/05/26 08:44] (current)
sourek
Line 8: Line 8:
  
 <​code>​ <​code>​
-roles;position;organizational unit +roles;company;city 
-Manager;Leader;Business +role1;company1;Prague 
-"MASTER RO +"role1 
-PAY-OP +role2";​company2;​Rome 
-PAY-SP +role3;company3;Shanghai
-PAY-BLL +
-AMT-BLK +
-ACC-CLOSE"​;Manager;Business+
 </​code>​ </​code>​
  
 As you can see roles column can be single or multivalued. For multivalued roles, definition from the same row will be added to every role. As you can see roles column can be single or multivalued. For multivalued roles, definition from the same row will be added to every role.
-CSV file can have optional number of columns, role and automatic role definitions columns are specified in setup of LRT.+CSV file can have an optional number of columns, role and automatic role definitions columns are specified in setup of LRT. 
 + 
 +<note important>​CzechIdM uses by defaul utf-8 encoding. If your input file is encoded in diferent encoding, or if you experience some issues with non english characters, you may set different encoding in configuration of import long running task. Examples of other used encodings might be windows-1250,​ utf-8 or windows-1252</​note>​
  
 ==== 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.
  
 ==== Fill all attributes ==== ==== Fill all attributes ====
Line 31: Line 30:
 - Task type - **ImportAutomaticRoleAttributesFromCSVExecutor** - Task type - **ImportAutomaticRoleAttributesFromCSVExecutor**
 - 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 in csv file+- Import file encoding - the encoding of the csv file 
 +- Column with roles - Name of the column with the names of roles in csv file 
 +- Use role codes instead of role names - If checked, tries to find roles by code directly, if not, converts names to codes (replaces spaces with underscores) (since 1.9.0)
 - Column with description - name of the column with role description,​ can be also used to update 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 file - Column separator - separator of columns in csv file
Line 40: Line 41:
 - Second contract eav name - name of existing eav attribute of contract which will be checked for match with automatic attribute - Second contract eav name - name of existing eav attribute of contract which will be checked for match with automatic attribute
  
-{{:​tutorial:​adm:​screenshot_2019-06-20_at_15.34.51.png?400|}}+{{:​tutorial:​adm:​screenshot_from_2020-05-05_15-21-37.png?400|}}
 ==== Run the task ==== ==== Run the task ====
  
Line 57: Line 58:
 Number of processed items means how many role names is in csv. Number of processed items means how many role names is in csv.
 Number of finished items are roles that were found in IdM and has't got automatic role definition. Number of finished items are roles that were found in IdM and has't got automatic role definition.
 +
 +<note important>​This task only imports the roles but **does not calculate them**! In other words, the rules are now active but the accounts have to recalculated for them to start assigning roles. If you want to recalculate roles, run the task Recalculate all automatic roles by attribute.</​note>​
  
 ==== Known issues ==== ==== Known issues ====
 +
 +<note warning>​In Extras 1.8.0 and lower, there is a bug. If you have multiple EAV attributes with the same code in different form definitions (e. g., for identity and contract), the task can fail because it doesn'​t check the definition. An easy fix is to rename the attribute.</​note>​
  
 If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. If you delete or upload new file via dropzone, you should delete old files, created from previous uploads.