4 Extending the Functionality of the Connector

You can extend the functionality of the connector to address your specific business requirements.

This chapter contains the following optional procedures:

Note:

From Oracle Identity Manager Release 11.1.2 onward, lookup queries are not supported. See Managing Lookups in Oracle Fusion Middleware Administering Oracle Identity Manager for information about managing lookups by using the Form Designer in the Oracle Identity Manager System Administration console.

4.1 Configuring Custom Parsers

By default, the connector supports processing of flat files exported in the CSV format. To support the processing of flat files exported in formats other than CSV, you must create a custom parser and integrate it with the connector.

By default, the connector installation media contains the CSVParser.

This section contains the following topics:

4.1.1 Creating the Custom Parser

Learn about creating a custom parser.

4.1.1.1 About Creating the Custom Parser

To configure custom parsers, you must write the code that implements the required custom parser logic in a Java class.

This custom parser class must implement the FlatFileParser interface and the parse method.

Note:

Ensure that the Java version of Oracle Identity Manager and the compiled class is the same.

The following procedure describes the way in which the code must be written to implement the required custom parser logic:

class customParser implements FlatFileParser{

    void parse(File flatFile, FlatFileRecordHandler recordHandler, ParserConfig  
    config) {

    For each record in the flatFile, do the following:

    Start loop

        1) Perform mandatory attribute validation. If all the mandatory attributes
           are present, continue, else skip the record.
           See About Mandatory Attributes Validation for more 
           information on mandatory attribute validation.

        2) Check for the Filter. Skip this step if the filter is not present. If
           the filter is present and the record satisfies the filter, then
           continue, else, skip the record.
           See About Filters for more information on
           filters.

        3) Create a new FlatFileRecord object and populate all the
           attributes in the record.

            a) Get a list of fields to be sent from the parser, by using
               attributesToGet() method of ParserConfig object.
               The parser should only send these fields back to the requester,
               though the flat file may contain many more.

            b) Check if the field is a single or multivalued field by using the
               isMultiValued(fieldName) method of the FlatFileSchema object that
               is returned by the ParserConfig's getSchema() method.

                i) If the field is single-valued, then add it to the record by
                   using the FlatFileRecord's
                   addSingleValuedAttribute(fieldname,fieldValue).

                ii) If the field is a multivalued Attribute, then check if the
                    attribute is a complex multivalued Attribute. A complex
                    multivalued attribute is an attribute which contains
                    subfields. The getSubFields(fieldname)method of the schema
                    returns the list of subfields if they are present, or returns
                    null, if they are not.

                    ii.a) If the multivalued field does not contain subfields,
                          then add it to the record by using the FlatFileRecord's
                          method addMultiValueAttribute(fieldname, list of
                          attribute values).

                    ii.b) If the multivalued field contains subfields, then the
                          multivalued field is complex field. This value can be
                          added to the record by using the FlatFileRecord's method
                          addComplexAttribute(fieldname, list of map of values).

                          See About Handling Multivalued Attributes
                          for more information about multivalued attributes.

        4) Finally, pass the FlatFileRecord back to the requester by calling the
           RecordHandler's handle method.

    Endloop

    }

4.1.1.2 About Mandatory Attributes Validation

If the mandatory attributes have null or empty values, then you can skip processing such records or log these records at the parser level.

The default CSVParser performs the check on mandatory attributes. If any mandatory attribute contains a value null or empty, the CSV parser creates a directory called "failed" under the directory containing the flat file, and copies the failed records to a flat file with the same name.

The getMandatoryAttrs() method of the FlatFileSchema object returns the list of attributes required by the connector. The FlatFileSchema Object is obtained from the parserConfig parameter of the parse method. The getComplexMandatoryAttributes() method returns the list of complex attributes, and the getSimpleMandatoryAttributes() method returns the list of simple attributes.

4.1.1.3 About Filters

Filters can be specified at the parser level. If a record matches the filter, it is processed, otherwise it can be skipped.

Only simple filters, without the 'and' or 'or' expressions, are supported at the parser level. However, you can specify complex filters by specifying a value for the Filter attribute in the scheduled jobs, as they are supported by ICF. In addition, limited reconciliation comes with a performance overhead, as the entire flat file is parsed to check the filter criteria.

The getFilter() method of the ParserConfig parameter of the parse method returns the FlatFileFilter Object. It is a filter object, represented by the attribute name, the attributes value, and the operator.

A filter such as equalsTo('username','johndoe') can be used in the parser as follows:

FlatFileFilter filter=config.getFilter();
String filterFieldname=filter.getFieldName();
String filterValue=filter.getFieldValue();
Operators operator=filter.getOperator();
// since its equalsTO filter, the Operator will be Operators.EQUALS
If(operator.equals(Operators.EQUALS)){
    String userValue=getUserValue(filterFieldname);
    If(userValue.equals(filterValue))
    //process the record
    Else 
    //skip the record
}

4.1.1.4 About Handling Multivalued Attributes

Multivalued attributes are of two types, they are complex and simple. Simple multivalued attributes do not contain any subfields. Complex multivalued attributes contain subfields.

Example 1: Roles is a complex multivalued attribute and it contains subfields like Role Name, Start Date, and End Date. The connector requires the complex data to be represented in a list of mappings that contain subfields and their values in a key-value pair. The following is the format in which the data must be represented:

If there are three roles, such as role1, role2, role3 assigned to the user, then the connector requires a list of these maps in the following format:

List of< Role1 Map, Role2 Map, Role3 Map>.

Here, each role value is in itself a map with key as sub-field name and its value as sub-field value.

Example 2: Groups is a simple multivalued attribute, and it contains such as group1, group2, group3. Here, the connector requires a list of all these values in the following format:

List of<Group1, Group2, Group3>.

4.1.2 Integrating the Custom Parser with the Flat File Connector

Perform this procedure to integrate the custom parser with the connector before it can be used.

  1. Create a JAR file to hold the custom parser class.

  2. Run the Oracle Identity Manager Download JARs utility to download the org.identityconnectors.flatfile-1.0.1115.jar file from the database. This utility is copied into the following location when you install Oracle Identity Manager:

    Note:

    Before you use this utility, verify that the WL_HOME environment variable is set to the directory in which Oracle WebLogic Server is installed.

    For Microsoft Windows:

    OIM_HOME/server/bin/DownloadJars.bat

    For UNIX:

    OIM_HOME/server/bin/DownloadJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being downloaded, and the location to which the JAR file is to be downloaded. Specify 4 (ICFBundle) as the value of the JAR type.

    See Also:

    Downloading JAR Utility in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager.

  3. Update the org.identityconnectors.flatfile-1.0.1115.jar file as follows:

    1. Extract the contents of the org.identityconnectors.flatfile-1.0.1115.jar file into a temporary directory.

    2. Create a directory called lib in the temporary directory.

    3. Copy the JAR file created in Step 1 into the lib directory.

    4. Re-create the org.identityconnectors.flatfile-1.0.1115.jar file by running the following command:

      jar -cvfm org.identityconnectors.flatfile-1.0.1115.jar META-INF/MANIFEST.MF *

      Note:

      While re-creating the JAR file, ensure that META-INF\MANIFEST.MF file is unchanged.

  4. Run the Oracle Identity Manager Update JARs utility to upload the org.identityconnectors.flatfile-1.0.1115.jar file to the database. This utility is copied into the following location when you install Oracle Identity Manager:

    For Microsoft Windows:

    OIM_HOME/server/bin/UpdateJars.bat

    For UNIX:

    OIM_HOME/server/bin/UpdateJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being uploaded, and the location from which the JAR file is to be uploaded. Specify 4 (ICFBundle) as the value of the JAR type.

    See Also:

    Upload JARs Utility in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager

  5. Restart the Oracle Identity Manager server after updating the JAR file.

  6. Update the Configuration lookup definition as follows:

    1. Log in to the Design Console.

    2. Depending on whether you have configured your target system as a target resource or a trusted source, search for and open one of the following lookup definitions:

      For target resource: Lookup.FlatFile.Configuration

      For trusted source: Lookup.FlatFile.Configuration.Trusted

    3. Click Add.

    4. In the newly added row, enter the following values:

      Code Key: parserClassName

      Decode: The fully qualified name of the class implementing the custom parser.

      Sample value: com.extension.parser.XMLParser

    5. If the custom parser uses custom configuration parameters, then click Add to add the following entry:

      Code Key: customConfigParams

      Decode: Specify the custom configuration parameters used by the custom parser. The decode value must be in the name-value format. In other words, in the following format:

      NAME1=VALUE1;NAME2=VALUE2

      Sample value: Type=DOM;Version=1.0

    6. Click Save.

4.2 Configuring Preprocess and Postprocess Tasks

Learn about preprocess and postprocess tasks and the procedure to integrate them with the connector.

This section contains the following topics:

4.2.1 Understanding the Preprocess and Postprocess Tasks

Preprocess and postprocess tasks can be run before and after reconciliation of accounts respectively.

These tasks can be used to perform any job on the flat file directory, like zipping files, unzipping files, encryption and decryption of the complete file dumps or specific fields in the files, virus scan of the files, or any other tasks limited only by the implementation of these tasks.

This section contains the following topics

4.2.1.1 About the Preprocess task

If you are writing code for the preprocess task, then the class must implement the FlatFilePreProcessHandler interface and the preProcess method.

The preProcess method has following parameters:

  • flatFileDir

    This parameter specifies the path to the directory containing the flat files.

  • configMap

    This parameter contains the mapping of all the configuration parameters from the main configuration lookup definition and the scheduled jobs.

The following procedure describes the way in which the code must be written to implement the FlatFilePreProcessHandler interface:

Class preProcessTask implements FlatFilePreProcessHandler{

    void preProcess(java.io.File flatFileDir,
        java.util.Map<java.lang.String,java.lang.Object> configMap) throws java.lang.Exception{

        //perform the pre process task like unzip and decrypting the files etc.

    }

}

4.2.1.2 About the Postprocess Task

If you are writing code for the postprocess task, then the class must implement the FlatFilePostProcessHandler interface and the postProcess method.

The postProcess method has following parameters:

  • flatFileDir

    This parameter specifies the path to the directory containing the flat files.

  • configMap

    This parameter contains the mapping of all the configuration parameters from the main configuration lookup definition and the scheduled jobs.

The following procedure describes the way in which the code must be written to implement the FlatFilePostProcessHandler interface:

Class postProcessTask implements FlatFilePostProcessHandler{

    void postProcess(java.io.File flatFileDir,
        java.util.Map<java.lang.String,java.lang.Object> configMap) throws java.lang.Exception{

        //perform the post process task like encrypting the files,
        //password protecting files etc.

    }

}

4.2.2 Integrating the Preprocess and Postprocess Tasks with the Flat File Connector

This is the procedure to integrate preprocess and postprocess tasks with the connector before they can be used.

To configure preprocess and postprocess tasks:

  1. Create a JAR file to hold the preprocess or postprocess task class.

  2. Run the Oracle Identity Manager Download JARs utility to download the org.identityconnectors.flatfile-1.0.1115.jar file from the database. This utility is copied into the following location when you install Oracle Identity Manager:

    Note:

    Before you use this utility, verify that the WL_HOME environment variable is set to the directory in which Oracle WebLogic Server is installed.

    • For Microsoft Windows:

      OIM_HOME/server/bin/DownloadJars.bat

    • For UNIX:

      OIM_HOME/server/bin/DownloadJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being downloaded, and the location to which the JAR file is to be downloaded. Specify 4 (ICFBundle) as the value of the JAR type.

    See Also:

    Downloading JAR Utility in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager.

  3. Update the org.identityconnectors.flatfile-1.0.1115.jar file as follows:

    1. Extract the contents of the org.identityconnectors.flatfile-1.0.1115.jar file into a temporary directory.

    2. Create a directory called lib in the temporary directory.

    3. Copy the JAR file created in Step 1 into the lib directory.

    4. Re-create the org.identityconnectors.flatfile-1.0.1115.jar file by running the following command:

      jar -cvfm org.identityconnectors.flatfile-1.0.1115.jar META-INF/MANIFEST.MF *

      Note:

      While re-creating the JAR file, ensure that META-INF\MANIFEST.MF file is unchanged.

  4. Run the Oracle Identity Manager Update JARs utility to upload the org.identityconnectors.flatfile-1.0.1115.jar file to the database. This utility is copied into the following location when you install Oracle Identity Manager:

    • For Microsoft Windows:

      OIM_HOME/server/bin/UpdateJars.bat

    • For UNIX:

      OIM_HOME/server/bin/UpdateJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being uploaded, and the location from which the JAR file is to be uploaded. Specify 4 (ICFBundle) as the value of the JAR type.

    See Also:

    Upload JARs Utility in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager

  5. Restart the Oracle Identity Manager Server after updating the jar.

  6. Repeat Steps 1 through 5 to create a JAR file to hold the postprossess task class and copy the JAR file into Oracle Identity Manager.

  7. Update the Configuration lookup definition as follows:

    1. Log in to the Design Console.

    2. Depending on whether you have configured your target system as a target resource or a trusted source, search for and open one of the following lookup definitions:

      For target resource: Lookup.FlatFile.Configuration

      For trusted source: Lookup.FlatFile.Configuration.Trusted

    3. Click Add.

    4. If you have written code for the preprocess task, then in the newly added row, enter the following values:

      Code Key: preProcessClassName

      Decode: The fully qualified name of the class implementing the preprocess task.

      Sample value: com.extension.parser.PreProcessHandler

    5. If you have written code for the postprocess task, then in the newly added row, enter the following values:

      Code Key: postProcessClassName

      Decode: The fully qualified name of the class implementing the preprocess task.

      Sample value: com.extension.parser.PostProcessHandler

    6. Click Save.

4.3 Adding New Attributes for Target Resource Reconciliation

By default, the attributes listed in the Recon Attribute Map of the connector are mapped for reconciliation between Oracle Identity Manager and the target system. If required, you can add new attributes for target resource reconciliation.

Note:

This section describes an optional procedure. You need not perform this procedure if you do not want to add new attributes for reconciliation.

To add a new attribute for target resource reconciliation, perform the following procedure:

Note:

You must ensure that the new attributes that you add for reconciliation contain data in string-format only. Binary attributes must not be introduced into Oracle Identity Manager natively.

  1. Log in to the Oracle Identity Manager Design Console.

  2. Add the new attribute on the OIM User process form as follows:

    1. Expand Development Tools.

    2. Double-click Form Designer.

    3. Search for and open the process form of the enterprise target system. For example, UD_ACME_USR.

    4. Click Create New Version.

    5. In the Label field, enter the version name. For example, version#1.

    6. Click Save.

    7. Select the current version created in Step 2.e from the Current Version list.

    8. Click Add to create a new attribute, and provide the values for that attribute.

      For example, if you are adding the address number attribute, then enter the following values in the Additional Columns tab:

      Field Value

      Name

      AddressNumber

      Variant Type

      String

      Length

      100

      Field Label

      AddressNumber

      Order

      14

    9. Click Save.

    10. Click Make Version Active.

  3. All changes made to the Form Designer of the Design Console must be done in a new UI form as follows:

    1. Log in to Oracle Identity System Administration.

    2. Create and active a sandbox. See Creating and Activating a Sandbox for more information.

    3. Create a new UI form to view the newly added field along with the rest of the fields. See Creating a New UI Form for more information about creating a UI form.

    4. Associate the newly created UI form with the application instance of your target system. To do so, open the existing application instance for your resource, from the Form field, select the form (created in Step 3.c), and then save the application instance.

    5. Publish the sandbox. See Publishing a Sandbox for more information.

  4. Add the new attribute to the list of reconciliation fields in the resource object as follows:

    1. Expand Resource Management.

    2. Double-click Resource Objects.

    3. Search for and open the target resource object. For example, ACME User.

    4. On the Object Reconciliation tab, click Add Field, and then enter the following values:

      Field Name: AddressNumber

      Field Type: String

    5. Click Save and then close the dialog box.

  5. Create a reconciliation field mapping for the new attribute in the process definition form as follows:

    1. Expand Process Management.

    2. Double-click Process Definition.

    3. Search for and open the ACME User process definition.

    4. On the Reconciliation Field Mappings tab, click Add Field Map, and then select the following values:

      Field Name: AddressNumber

      Field Type: String

      Process Data Field: AddressNumber

    5. Click Save.

    6. Click Create Reconciliation Profile from the corresponding resource object. This copies changes made to the resource object into the MDS.

  6. Create an entry for the attribute in the lookup definition for reconciliation as follows:

    1. Expand Administration.

    2. Double-click Lookup Definition.

    3. Search for and open the Recon Attribute Map lookup definition of the Flat File connector.

    4. Click Add and enter the Code Key and Decode values for the attribute. The Code Key value must be the name of the attribute given in the resource object. The Decode value is the name of the corresponding column in the flat file.

      For example, enter AddressNumber in the Code Key field and then enter ADDRS_NUM in the Decode field. Note that both Code Key and Decode values are the same.

    5. Click Save.

4.4 Adding New Multivalued Attributes for Target Resource Reconciliation

You can add new multivalued attributes such as Roles, which can have subfields like role name and so on.

To add a new multivalued attribute for target resource reconciliation:

  1. Log in to the Oracle Identity Manager Design Console.

  2. Create a form for the multivalued field as follows:

    1. Expand Development Tools and double-click Form Designer.

    2. Create a form by specifying a table name, for example UD_CARLICEN and description, and then click Save.

    3. Click Add and enter the details of the field.

    4. Click Save and then click Make Version Active.

  3. Add the form created for the multivalued field as a child form of the process form as follows:

    1. Search for and open the parent process form. For example, US_ACMEUSR.

    2. Click Create New Version.

    3. Click the Child Table(s) tab.

    4. Click Assign.

    5. In the Assign Child Tables dialog box, select the newly created child form, click the right arrow, and then click OK.

    6. Click Save and then click Make Version Active.

  4. All changes made to the Form Designer of the Design Console must be done in a new UI form as follows:

    1. Log in to Oracle Identity System Administration.

    2. Create and active a sandbox. See Creating and Activating a Sandbox for more information.

    3. Create a new UI form to view the newly added field along with the rest of the fields. See Creating a New UI Form for more information about creating a UI form.

    4. Associate the newly created UI form with the application instance of your target system. To do so, open the existing application instance for your resource, from the Form field, select the form (created in Step 4.c), and then save the application instance.

    5. Publish the sandbox. See Publishing a Sandbox for more information.

  5. Add the new multivalued field to the list of reconciliation fields in the resource object as follows:

    1. Log in to the Design Console.

    2. Expand Resource Management and then double-click Resource Objects.

    3. Search for and open one the resource objects. For example, ACME User.

    4. On the Object Reconciliation tab, click Add Field.

    5. In the Add Reconciliation Fields dialog box, enter the details of the field.

      For example, enter carlicenses in the Field Name field and select Multi-Valued Attribute from the Field Type list.

    6. Click Save and then close the dialog box.

    7. Right-click the newly created field and select Define Property Fields.

    8. In the Add Reconciliation Fields dialog box, enter the details of the newly created field.

      For example, enter carlicense in the Field Name field and select String from the Field Type list.

    9. Click Save and then close the dialog box.

  6. Create an entry for the field in the lookup definition for reconciliation as follows:

    1. Expand Administration and then double-click Lookup Definition.

    2. Search for and open the Recon Attribute Map lookup definition. For example, Lookup.ACME.UM.ReconAttrMap.

      Note:

      For the target system fields, you must use the same case (uppercase or lowercase) as given on the target system. This is because the field names are case-sensitive.

    3. Click Add and enter the Code Key and Decode values for the field, and then Click Save. The Code Key and Decode values must be in the following format:

      Code Key: MULTIVALUED_FIELD_NAME~CHILD_RESOURCE_OBJECT_FIELD_NAME

      Decode: Corresponding target system attribute.

      For example, enter carlicenses~carlicense in the Code Key field and then enter carlicense in the Decode field.

  7. Create a reconciliation field mapping for the new field as follows:

    1. Expand Process Management and double-click Process Definition.

    2. Search for and open one of the ACME User process definitions.

    3. On the Reconciliation Field Mappings tab of the ACME User process definition, click Add Table Map.

    4. In the Add Reconciliation Table Mapping dialog box, select the field name and table name from the list, click Save, and then close the dialog box.

    5. Right-click the newly created field, and select Define Property Field Map.

    6. In the Field Name field, select the value for the field that you want to add.

    7. Double-click the Process Data Field field, and then select UD_CARLICEN.

    8. Select Key Field for Reconciliation Field Matching and click Save.

    9. Click Create Reconciliation Profile from the corresponding resource object. This copies changes made to the resource object into the MDS.

4.5 Configuring Validation of Data During Reconciliation

You can configure validation of reconciled single-valued data according to your requirements. For example, you can validate data fetched from the First Name attribute to ensure that it does not contain the number sign (#).

To configure validation of data:

  1. Write code that implements the required validation logic in a Java class.

    The following sample validation class checks if the value in the First Name attribute contains the number sign (#):

    package com.validate;
    import java.util.*;
    public class MyValidation {
    
    public boolean validate(HashMap hmUserDetails,
             HashMap hmEntitlementDetails, String field) {
                /*
             * You must write code to validate attributes. Parent
             * data values can be fetched by using hmUserDetails.get(field)
             * For child data values, loop through the
             * ArrayList/Vector fetched by hmEntitlementDetails.get("Child Table")
             * Depending on the outcome of the validation operation, 
             * the code must return true or false.
             */
             /*
             * In this sample code, the value "false" is returned if the field
             * contains the number sign (#). Otherwise, the value "true" is
             * returned.
             */
                boolean valid=true;
                String sFirstName=(String) hmUserDetails.get(field);
                for(int i=0;i<sFirstName.length();i++){
                  if (sFirstName.charAt(i) == '#'){
                        valid=false; 
                        break;
                  } 
                }
                return valid;
            }
          } /* End */
    
  2. Create a JAR file to hold the Java class.

  3. Run the Oracle Identity Manager Upload JARs utility to post the JAR file created in Step 2 to the Oracle Identity Manager database. This utility is copied into the following location when you install Oracle Identity Manager:

    Note:

    Before you use this utility, verify that the WL_HOME environment variable is set to the directory in which Oracle WebLogic Server is installed.

    For Microsoft Windows:

    OIM_HOME/server/bin/UploadJars.bat

    For UNIX:

    OIM_HOME/server/bin/UploadJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being uploaded, and the location from which the JAR file is to be uploaded. Specify 1 as the value of the JAR type.

  4. If you created the Java class for validating a process form field for reconciliation, then:

    1. Log in to the Design Console.

    2. Search for and open the Lookup.FlatFile.UM.ReconValidation lookup definition.

      Note:

      If you do not find this lookup definition, then create it.

    3. In the Code Key column, enter the resource object field name that you want to validate For example, Username. In the Decode column, enter the class name. For example, org.identityconnectors.flatfile.extension.ACMEValidator.

    4. Save the changes to the lookup definition.

    5. Search for and open the Lookup.FlatFile.UM.Configuration lookup definition.

    6. In the Code Key column, enter Recon Validation Lookup. In the Decode column, enter Lookup.FlatFile.UM.ReconValidation.

    7. Save the changes to the lookup definition.

  5. Purge the cache to get the changes reflected in Oracle Identity Manager. See Purging Cache in Oracle Fusion Middleware Administering Oracle Identity Manager.

4.6 Configuring Transformation of Data During Reconciliation

You can configure the transformation of reconciled single-valued data according to your requirements. For example, you can use First Name and Last Name values to create a value for the Full Name field in Oracle Identity Manager.

Note:

  • This section describes an optional procedure. Perform this procedure only if you want to configure transformation of data during reconciliation.
  • Do not copy the the transformation jar into the connector bundle. Instead, register it as JavaTask only.

To configure the transformation of data:

  1. Write code that implements the required transformation logic in a Java class.

    This transformation class must implement the transform method. The following sample transformation class modifies the Username attribute by using values fetched from the __NAME__ attribute of the target system:

    package com.transformationexample;
    import java.util.HashMap;
    public class MyTransformer {
    public Object transform(HashMap hmUserDetails, HashMap
    hmEntitlementDetails, String sField) throws ConnectorException {
          /*
          * You must write code to transform the attributes.
          * Parent data attribute values can be fetched by using hmUserDetails.get("Field Name").
          * To fetch child data values, loop through the
          * ArrayList/Vector fetched by hmEntitlementDetails.get("Child Table")
          * Return the transformed attribute.
          */
            String sUserName = (String) hmUserDetails.get("__NAME__");
            return sUserName + "@example.com";
            }
    }
    
  2. Create a JAR file to hold the Java class.

  3. Run the Oracle Identity Manager Upload JARs utility to post the JAR file created in Step 2 to the Oracle Identity Manager database. This utility is copied into the following location when you install Oracle Identity Manager:

    Note:

    Before you use this utility, verify that the WL_HOME environment variable is set to the directory in which Oracle WebLogic Server is installed.

    For Microsoft Windows:

    OIM_HOME/server/bin/UploadJars.bat

    For UNIX:

    OIM_HOME/server/bin/UploadJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being uploaded, and the location from which the JAR file is to be uploaded. Specify 1 as the value of the JAR type.

  4. Create a new lookup definition by the name Lookup.FlatFile.UM.ReconTransformation as follows:

    1. Log in to the Design Console.

    2. Expand Administration, and then double-click Lookup Definition.

    3. In the Code field, enter Lookup.FlatFile.UM.ReconTransformation as the name of the lookup definition.

    4. In the Field field, enter the name of the table column of the Oracle Identity Manager or user-created form or tab, from which the text field, lookup field, or box field will be accessible.

    5. Select the Lookup Type option.

    6. On the Lookup Code Information tab, click Add.

    7. In the Code Key column, enter the name of the attribute on which you want to apply the transformation. For example: FirstName.

    8. In the Decode column, enter the name of the class file. For example: oracle.iam.connectors.flatfile.Transformation.

    9. Save the lookup definition.

  5. Update the User Configuration lookup definition as follows:

    1. Expand Administration, and then double-click Lookup Definition.

    2. Search for and open the Lookup.FlatFile.UM.Configuration lookup definition.

    3. On the Lookup Code Information tab, click Add.

      A new row is added.

    4. In the Code Key column, enter Recon Transformation Lookup.

      In the Decode column, enter Lookup.FlatFile.UM.ReconTransformation.

    5. Save the changes to the lookup definition.

  6. Purge the cache to get the changes reflected in Oracle Identity Manager. See Purging Cache in Oracle Fusion Middleware Administering Oracle Identity Manager for information on purging cache.

4.7 Configuring the Connector for Multiple Installations of the Target System

You must create copies of connector objects to configure the connector for multiple installations of the target system.

The following example illustrates this requirement to configure the connector for multiple installations of the target system:

The London and New York offices of Example Multinational deal with flat files of different formats, and want to associate custom parsers, preprocess and postprocess handlers with each of these different formats. The company has recently installed Oracle Identity Manager, and they want to configure Oracle Identity Manager to link all the installations of the target system.

To meet the requirement posed by such a scenario, you can create copies of connector objects, such as the IT resource and resource object.

The decision to create a copy of a connector object is based on a requirement. For example, an IT resource can hold connection information for one target system installation. Therefore, it is mandatory to create a copy of the IT resource for each target system installation.

With some other connector objects, you do not need to create copies at all. For example, a single attribute-mapping lookup definition can be used for all installations of the target system.

To configure the connector for multiple installations of the target system:

  1. Create a Flat File connector bundle with a different version. To do so:

    1. Extract the contents of the org.identityconnectors.flatfile-1.0.1115.jar file on the installation media to a temporary directory.

    2. In a text editor, open the MANIFEST.MF file located in the META-INF directory for editing.

    3. Specify a new value for the ConnectorBundle-Version attribute. For example, specify 1.0.1116 as the new value.

    4. Save and close the file.

    5. Upload the JAR file by performing the procedure described in Step 3 of Integrating the Custom Parser with the Flat File Connector to specify a custom parser, or perform the procedure described in Step 3 of Integrating the Preprocess and Postprocess Tasks with the Flat File Connector to specify custom preprocess or postprocess tasks.

    6. Rename the connector bundle to reflect the new version. For example, org.identityconnectors.flatfile-1.0.1116.jar.

  2. Run the Oracle Identity Manager Upload JARs utility to upload the newly created JAR file (for example, org.identityconnectors.flatfile-1.0.1116.jar file) to the database. This utility is copied into the following location when you install Oracle Identity Manager:

    Note:

    Before you use this utility, verify that the WL_HOME environment variable is set to the directory in which Oracle WebLogic Server is installed.

    For Microsoft Windows:

    OIM_HOME/server/bin/UploadJars.bat

    For UNIX:

    OIM_HOME/server/bin/UploadJars.sh

    When you run the utility, you are prompted to enter the login credentials of the Oracle Identity Manager administrator, URL of the Oracle Identity Manager host computer, context factory value, type of JAR file being uploaded, and the location from which the JAR file is to be uploaded. Specify 4 (ICFBundle) as the value of the JAR type.

    See Also:

    Upload JARs Utility in Oracle Fusion Middleware Developing and Customizing Applications for Oracle Identity Manager

  3. Create a configuration lookup definition for this instance of the target system. For example, create a lookup definition by the name Lookup.FlatFile.Configuration1.

  4. Add the following entries to this lookup definition and specify the corresponding values in the Decode column:

    • Connector Name

    • Bundle Version

    • User Configuration Lookup

    • Bundle Name

    Note:

    Ensure that the Decode value of Bundle Version is the latest version specified in Step 2. For example, 1.0.1116. For all entries other than Bundle Version, you can specify the same values as those present in the Lookup.FlatFile.Configuration lookup definition.

  5. Create an IT resource of the Flat File IT Resource type. Ensure that the value of the Configuration Lookup parameter in this newly created IT resource contains the name of the lookup definition created in Step 3.

  6. If you are using the connector server, then repeat Steps 1 through 5 of this section with the following difference:

    While performing Step 2 of this procedure, instead of uploading the newly created JAR file to Oracle Identity Manager database, copy it to the CONNECTOR_SERVER_DIR/bundles directory.