The LRT ImportAutomaticRoleForTreeNodeFromCSVExecutor allows you to import automatic roles which will use tree nodes in their rules. All you need is to have some tree nodes and roles in your environment.
Let's prepare a sample CSV file:
nodename;nodeid;rolecode;recursion
one;;role2;UP
two;;role2;UP
Before you start, create two sample organization units (tree nodes):
Name: Organization One, code: one
Name: Organization Two, code: two
Then create one role with the code "role2" and name "role2".
Go to Settings>Task scheduler>Scheduled task and click the green button Add. Select ImportAutomaticRoleForTreeNodeFromCSVExecutor. Configure the Task parameters.
Import csv file: Use the drop-zone to select the CSV file for your import.
Column with node codes: Specify in which column of the CSV file the tree node codes are. This is required.
Column with node IDs: Specify in which column of the CSV file the node IDs are. This is quite literally the UUID of the tree node and it is used only if the tree node cannot be found using its code.
Column with role codes: Specify in which column of the CSV file the codes of the roles for which you are creating the automatic role are. This is required.
Column with recursion type: Specify in which column of the CSV file the recursion types for each automatic role are. You can set different recursion types for your automatic roles. The possible values in the CSV file are 'DOWN' (Down by the structure), 'UP' (Up by the structure), and 'NO' (Without recursion). If you leave this empty or if a line in the CSV file has no recursion type specified, the default Without recursion is used. Make sure to use a capital version in your CSV (e. g., 'UP', not 'up')
Column separator: Specify which character is used to separate the columns in the CSV file. Default is ';'. This is required.
Finally, click Save and run the task using the green arrow.