The Resource Catalog provides a wizard for importing resources defined in a comma-separated values (CSV) file. For example, if you define the set of resources you want to implement by using a spreadsheet, you can export the definitions of those resources to a CSV file format, then use the Import Resources wizard to add the resources to the Resource Catalog.
When you create a file to use as input to the Import Resources Wizard, you must follow the column layout defined in Table 12-3. In addition, you must also follow the CSV file format described in Section 12.3.2, Required CSV File Format.
Table 12-3 Import Record Format
Multi-value properties: Use the | symbol as the delimiter between values.
DN properties: Specify in dot notation. Designer validates these properties on deploy to ensure that the values correspond to existing Identity Vault objects.
Character set encoding must be UTF-8.
When you create your spreadsheet to use as input to the Import Resources Wizard, keep in mind that the wizard expects a specific format. It expects a twelve-column document with the columns defined in the order described in Table 12-3. The wizard also expects the input file to follow the CSV format rules defined in RFC4180. This format is briefly summarized below:
Each Resource record is on a separate line.
Each field in a Resource record is separated by a comma and is quoted.
Each line is delimited by a line break (CRLF).
The first line of the file can be a header line, but this is optional. The wizard allows you to identify whether the file contains a header line.
If your file contains a header line, then it must contain the Resource record’s field names. The header line field count must correspond to the field count of each line in the file.
Quotes on numbers are not required.
A resource record example:
Doctor,en~Doctor,en~Doctor|it~Dottore|fr~Docteur,,admin.novell|ablake.users.medical-idmsample.novell,admin.novell|ablake.users.medical-idmsample.novell,admin.novell|ablake.users.medical-idmsample.novell,Standard~50,admin.novell|ablake.users.medical-idmsample.novell,MyCustomPrdCN,true
Quotes and nested quotes: You can use single quotes within a text field (such as Display name). Use double quotes to enclose a column.
NOTE:For optional fields, the line must include an empty string " " as a placeholder.
Open the Provisioning view of the Designer project where you want to import the roles.
Select the
node, right-click then select .Designer launches the wizard.Fill in the fields as follows:
Click
.The wizard reads the CSV file and adds all the resources that meet the criteria for import. If the wizard encounters an error (see Error Handling for a list of possible errors), the wizard writes the role record to an error file.The wizard creates the error file in the same location as the Role CSV file to import, and it names the file the same name as the Resource CSV file with the _errors appended to the name.
Only the errors identified in Error Handling are severe enough to prevent the wizard from creating the resource. If the wizard encounters other types of errors, it adds the resource, but you must make corrections before the resource can be deployed. For example, if the category specified in the role is not yet added to the directory abstraction layer role category list, the resource can be added, but Designer displays the resource with an informational message.
Resource that are created with errors like this cannot be deployed until the errors are corrected. The Project Checker notifies you of the errors if you attempt to deploy the resource or if you validate the resource objects.
Table 12-4 describes the cases where a resource cannot be imported. When the wizard encounters these errors, it generates an error file and writes the complete resource record to the file. It maintains the resource original column order except that it inserts a new column as the first column in the record. This column includes the error code. You can modify the associated resource to fix the error directly within the error file, delete the error code column, then specify this error file as input to the wizard.
Table 12-4 CSV Import Wizard Error Codes