Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial:adm:roles_-_import_data_from_csv [2019/06/10 20:59] hanakp |
tutorial:adm:roles_-_import_data_from_csv [2022/09/05 14:18] apeterova fixed formatting |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Roles - Import of data from CSV ====== | ====== Roles - Import of data from CSV ====== | ||
- | ===== 1a. Prepare | + | ==== 1. Prepare |
- | Please use [[tutorial: | + | Here is an example of a CSV file which can be used for importing (or updating) |
- | + | ||
- | ==== 1b. Prepare CSV file ==== | + | |
- | + | ||
- | Here is an example of CSV file which can be used for import | + | |
< | < | ||
- | roles;description | + | roles;code; |
- | Manager;Some role description | + | testimportrolename; |
- | " | + | |
- | PAY-OP | + | |
- | PAY-SP | + | |
- | PAY-BLL | + | |
- | AMT-BLK | + | |
- | ACC-CLOSE" | + | |
</ | </ | ||
- | As you can see roles column can be single or multivalued. For multivalued roles, | + | In Excel, it looks like this: {{ .: |
- | CSV file can have optional number of columns, role and description columns | + | |
+ | As you can see roles column can contain | ||
+ | |||
+ | The result of this LRT used with this CSV file should be that one new role testimportrolename (with code testimportrolecode) will be created. It will have these properties: | ||
+ | |||
+ | * description: | ||
+ | * attribute: ' | ||
+ | * guarantee: user with username ' | ||
+ | * guarantee by role: role with the code ' | ||
+ | * criticality: | ||
+ | * catalogue: it will be in ' | ||
+ | * it will have EAV with code ' | ||
+ | * it will create an account on system ' | ||
+ | |||
+ | <note important> | ||
==== 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 " | + | Now we will create the new LongRunningTask (LRT). As shown in the picture, go to Settings → Task scheduler → Scheduled tasks and hit green " |
+ | |||
+ | {{ .: | ||
==== Fill all attributes ==== | ==== Fill all attributes ==== | ||
Line 31: | Line 38: | ||
Now we need to create new LRT with these attributes: | Now we need to create new LRT with these attributes: | ||
- | - Task type - **ImportRolesFromCSVExecutor** | + | **General:** |
- | - Import csv file - dropzone to select or drop csv file | + | |
- | - Column with roles - Name of the column with roles in csv file | + | * Upload a CSV file - dropzone to select or drop csv file |
- | - Column with description - name of the column with role description, | + | |
- | - Column separator - separator of columns in csv file | + | * Column with role codes - name of the column with role codes in csv file; if left empty, the role code is based on the role name, only spaces are replaced by underscores |
- | - Multi value separator - ( Char, default: | + | * Column with description - name of the column with role description, |
- | - System name - name of the system | + | * Column with criticality |
- | - MemberOf attribute name - ( default: rights | + | * Column with catalogue names - name of the column with catalogue names, can be also used to update catalogue names (if your CSV file doesn' |
- | - Can be requested | + | * Column with subrole codes - name of the column with subordinate roles codes, can be also used to update subordinate roles (if your CSV file doesn' |
+ | * Column separator - separator of columns in csv file (default ; ) | ||
+ | | ||
+ | * Role environment | ||
+ | * Can be requested | ||
+ | |||
+ | **Role attributes: | ||
+ | |||
+ | * Column with role attributes | ||
+ | * Form definition code - the code for the definition which will contain the added attributes (you only have to fill this if you are setting attributes) | ||
+ | |||
+ | **Role EAVs:** | ||
+ | |||
+ | You can set value to multiple role EAVs. The mechanism used for this is prefixes which are followed by the order number of the column (e. g., ' | ||
+ | |||
+ | * Prefix of column with name of EAV attribute: Only attributes from the main role definition | ||
+ | * Prefix of column with value of EAV attribute | ||
+ | |||
+ | **Guarantees: | ||
+ | |||
+ | * Column with guarantee | ||
+ | * Column with guarantee types - name of the column with role guarantee by identity [[.: | ||
+ | * Update guarantee types - check if you want to add new guarantee type to an existing guarantee (this will create a new guarantee with the selected type, the original one will still exist) (since Extras 2.2.0) | ||
+ | * Column with guarantee role - name of the column with role guarantee by role code, can be also used to update | ||
+ | * Column with guarantee role types - name of the column with role guarantee by role [[.: | ||
+ | * Update guarantee role types - check if you want to add new guarantee type to an existing guarantee role (this will create a new guarantee with the selected type, the original one will still exist) (since Extras 2.2.0) | ||
+ | |||
+ | **System: | ||
+ | |||
+ | You can set attributes at multiple systems or set multiple attributes in one system. The mechanism used for this is prefixes which are followed by the order number of the column (e. g., ' | ||
+ | |||
+ | * Prefix of column with system name | ||
+ | * Prefix of column with system attribute codes | ||
+ | * Prefix of column with system attribute values: The attribute has to a multivalued attribute with merge strategy set. | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | < | ||
+ | |||
+ | {{ .: | ||
- | {{: | ||
==== Run the task ==== | ==== Run the task ==== | ||
- | Now we just need to hit run. | + | Now we need to hit run. |
+ | |||
+ | {{.: | ||
+ | |||
+ | Now we must go to the "all tasks" panel, select the newly created LRT (check the checkbox), click Operation with selected record and Run selected task. | ||
+ | |||
+ | {{ .: | ||
+ | |||
+ | You can also check the status of the created roles there 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 and other imported values, and placed in the catalogue named by the system name. | ||
- | {{:tutorial: | + | {{ .:04_resultrole.png?direct& |
- | And we also need to process it in all tasks. | + | ==== Known issues ==== |
- | {{: | + | If you delete or upload new file via dropzone, you should delete old files, created from previous uploads. |
- | You can check status about created roles in "all tasks" panel in task detail. Here you can find information about created, updated or already existing roles. | ||
- | Everything should be set up so far and when the task ends, roles are imported in IdM, placed in catalogue named by system name. |