7.1 Schema Mapping Policy Tasks in Designer

This section contains instructions on performing common tasks related to Schema Mapping policies in Designer:

7.1.1 Accessing the Schema Map Editor

The Schema Map editor allows you to edit the Schema Mapping policies. There are three different ways to access the Schema Map editor in Designer: through the Outline view, through the Policy Flow view, or through the Policy Set view.

Outline View

  1. In an open project, click the Outline tab.

  2. Click the Show Model Outline icon.

  3. Select the driver you want to manage the schema mapping policy on, and click the plus sign to the right.

  4. Double-click the Schema Map icon to launch the Schema Map editor.

    or

    Right-click and select Edit.

    Schema Mapping Policy

Policy Flow View

  1. In an open project, click the Outline tab.

  2. Click the Show Policy Flow icon. Schema Mapping Policy

  3. Double-click the Schema Mapping policy to launch the Schema Map editor.

    or

    Right-click and select Edit Policy to launch the Schema Map editor.

    Schema Mapping Policy

Policy Set View

  1. Double-click the Schema Map policy in the Policy Set view.

    or

    Right-click the Schema Map policy and select Edit.

KeyBoard Support

Table 7-1 Schema Map Editor Keyboard Support

Action

Description

Up-arrow

Moves the cursor up in the Schema Map editor.

Down-arrow

Moves the cursor down in the Schema Map editor.

Left-arrow

Collapses the information displayed

Right-arrow

Expands the information displayed.

Insert

Adds a class.

Ctrl+Insert

Adds an attribute.

Delete

Deletes the selected items.

Enter

Accesses the edit mode. Press Enter a second time to commit the changes.

Esc

Exits the edit mode.

7.1.2 Editing a Schema Mapping Policy

The Schema Map editor allows you to create and edit schema mapping policies. To display a context menu, right-click an item.

Figure 7-1 Context Menu of the Schema Map Editor

Removing or Adding Classes and Attributes

Removing a Class or Attribute

If you do not want a class or an attribute to be mapped to a class or attribute in the connected system, the best practice is to completely remove the class or the attribute from the Schema Mapping policy. There are three different ways to add or remove attributes and classes from the Schema Mapping policy:

  • Select the class or attribute you want to remove, then right-click and click Delete.

  • Select the class or attribute you want to remove, then click the Delete icon in the upper right corner.

  • Select the class or attribute you want to remove, then press the Delete key.

You can select multiple classes or attributes to delete at the same time.

  1. Press Ctrl and select each item with the mouse.

  2. Press the Delete key to delete the items.

    Deleting Multiple Classes or Attributes
Adding a Class
  1. Right-click in the Schema Map editor, then click Add Class Mapping.

    or

    Select the Add Class Mapping icon Deleting Multiple Classes or Attributes in the upper right corner.

  2. From the drop-down list for the Identity Vault, select the class you want to add.

  3. From the drop-down list for the connected system, select the class you want to add.

  4. To save the changes, click File > Save.

Adding a Attribute
  1. Right-click in the Schema Map editor, then click Add Attribute Mapping.

    or

    Select the Add Attribute Mapping icon Deleting Multiple Classes or Attributes in the upper-right corner.

  2. From the drop-down list for the Identity Vault, select the attribute you want to add.

  3. From the drop-down list for the connected system, select the attribute you want to add.

  4. To save the changes, click File > Save.

Refreshing the Application Schema

If you have modified the schema in the application, these changes need to be reflected in the Schema Mapping policy. To make the new schema available, click the Refresh application schema icon Deleting Multiple Classes or Attributes in the toolbar.

When you create a new class or attribute mapping, you can see the new schema in the drop-down list for the connected application.

Editing Items

To edit a mapping, double-click the selected row. An in-place editor appears, allowing you to edit the mapping.

Figure 7-2 Schema Map Editor

Scheme Map Editor

Sorting Items

The Schema editor allows you to sort the items in ascending order based on either Identity Manager or the connected system. To sort, click the header of either column.

Figure 7-3 Schema Map Editor Sorting Items

Sorting Items

Managing Schema

Designer allows you to manage the Identity Vault schema and any connected system's schema. You can import the schema, modify it, and deploy the changed schema back into the Identity Vault or the connected systems. To manage the Identity Vault schema, right-click in the Schema Map editor and click Manage Identity Vault Schema. To manage the connected systems schema, right-click in the Schema Map editor and click Manage Application Schema. For information about how to manage the schema, see Managing the Schema in the Designer for Identity Manager 3: Administration Guide .

7.1.3 Testing Schema Mapping Policies

Designer comes with a tool called the Policy Simulator. It allows you to test your policies without implementing them a production environment. You can launch the Policy Simulator through the Schema Mapping editor to test your policy after you have modified it.

To access the Policy Simulator and test the Schema Mapping policy:

  1. Click the Launch Policy Simulator icon Sorting Items in the toolbar.

  2. Select Import to browse to a file that simulates an event.

    Policy Simulator
  3. Select the file, then click Open.

    This example uses the com.novell.designer.policy\simulation\add\user.xml file, which simulates an Add event of a user object.

    Policy Simulator

    The Policy Simulator displays the input document of the user Add event.

  4. Click Next to begin the simulation.

    Policy Simulator

    The Policy Simulator displays the log of the Add event, the output document, and a comparison of the input document to the output document that was generated.

    Policy Simulator
  5. Select the Trace tab to see the results of the Add event as you would through DSTRACE.

    Policy Simulator
  6. Select the Output tab to view the output document that is generated from the Schema Map policy executed against the input document. In this example, it is the user Add event.

  7. Select the Compare tab to compare the text of the input document to the document that is generated, which is the output document.

  8. Click Repeat to select a different input document and see the results of that event.

  9. When you have finished testing the Schema Mapping Policy, click Finish to close the Policy Simulator.

7.1.4 Accessing the Schema Mapping Policy XML

Designer enables you to view, edit, and validate the XML by using an XML editor or text editor.

Viewing the XML Source

You can view the XML Source in XML or in the XML tree format.

To open the XML Source view:

  1. Click XML > Source at the bottom of the Schema Map editor's workspace.

The XML editor displays line numbers. To see the line number, right-click in the left margin, then select Show Line Numbers.

Figure 7-4 Schema Map Policy Line Numbers

The XML editor expands or collapses the XML by function. If there are functions that contain a large amount of XML, you can collapse the XML by clicking the minus icon in the top left corner. To expand all of the XML functions, click the plus icon in the top left corner.

Each element has its own plus or minus icon in the left margin.

Figure 7-5 Schema Map Policy XML Plus or Minus

To view the XML in the tree format:

  1. Click XML Tree at the bottom of the Schema Map editor's workspace.

To see the entire tree view, expand each item listed.

Editing the XML Source

You can edit the XML through the XML editor. You can make changes here as well as through the GUI interface.

Figure 7-6 Editing the XML Source for the Schema Map Policy

The default editor that is loaded is associated to .xml file types. If a default editor can't be found, the system text editor is loaded. The functionality of the XML Source view is based on the editor that loads.

Right-click to display the list of the functions the XML editor contains.

  • Undo: Undoes the last action.

  • Revert File Reverts the file to the last version that was saved.

  • Saves: Saves the file.

  • Cut: Cuts the selected information.

  • Paste: Pastes the information into the document.

  • Shift Right: Indents the line to the right.

  • Shift Left: Indents the line to the left.

  • Attach DTD or XML Schema: Attaches a DTD or XML schema file for validation of the policy.

  • Validate: Validates the XML code.

  • Preferences: Sets the preferences for the XML editor.

To choose a different XML editor for your source view:

  1. From the Main menu, click Window > Preferences.

  2. Click General > Editor > File Associations.

  3. Select *xml from the list of file types.

  4. Select the editor you want (for example, Novell XML Editor) from the Associated editors. If the editor you want isn't in the list, you can click Add, then add it to the list.

  5. Click OK.

  6. Close and reopen the Schema Map editor. The default editor should be loaded in the XML Source view.

Validating the XML Source

The XML editor validates the XML code. Right-click, then select Validate. If there are errors, a red x is displayed on the line where the error occurs. An explanation at the bottom of the window gives more information about the problem.

Figure 7-7 Validating Schema Map Policy

In this example, the end tag of <attr-name> has no matching start tag.

7.1.5 Additional Schema Map Policy Options

When you right-click on a Schema Map policy, there are multiple options presented in the Outline view, the Policy Flow view, and the Policy Set view.

Outline View Additional Options

  1. Right-click the Schema Map policy in the Outline view.

    • Export Policy to Configuration File: Saves the Schema Map policy as a .xml file.

    • Live Operations > Deploy Policy: Deploys the Schema Map policy into the Identity Vault.

    • Live Operations > Compare Policy: Compares the Schema Map policy in Designer to the Schema Map policy in the Identity Vault.

    • Delete: Deletes the Schema Map policy.

    • Edit: Launches the Schema Map editor. For more information, see Section 7.1.2, Editing a Schema Mapping Policy.

    • Duplicate: Creates a copy of the Schema Map policy.

    • Save As: Saves the Schema Map policy as a .xml file.

    • Simulate: Tests the Schema Map policy. For more information, see Section 7.1.3, Testing Schema Mapping Policies.

    • Properties: Allows you to rename the Schema Map policy.

Policy Flow Additional Options

  1. Right-click the Schema Map policy in the Policy Flow view.

    • Add Policy > DirXML Script: Adds a new Schema Map policy using DirXML® Script.

    • Add Policy > XSLT: Adds a new Schema Map policy using XSLT.

    • Add Policy > Schema Mapping: Adds a new Schema Map policy, that contains no information.

    • Add Policy > Link to Existing: Allows you to browse and select an existing Schema Map policy to link to the current Schema Map policy.

    • Add Policy > Copy Existing: Allows you to browse to and select an existing Schema Map policy to copy to the current Schema Map policy.

    • Edit Policy > Schema Mapping: Launches the Schema Map editor. For more information, see Section 7.2.2, Editing the Schema Mapping Policy.

    • Delete All Set Policies: Deletes all policies in the selected policy set.

    • Remove All Set Policies: Removes all policies from the selected policy set, but it does not delete the existing policies.

    • Live Operations > Import Driver: Imports an existing driver from the Identity Vault.

    • Live Operations > Deploy Driver: Deploys the existing driver into the Identity Vault.

    • Live Operations > Driver Configuration > Import Attributes: Allows you to import attributes from the Identity Vault and compare the attributes from the Identity Vault to what is in Designer.

    • Live Operations > Driver Configuration > Deploy Attributes: Allows you to deploy attributes from Designer into the Identity Vault and compare the attributes from Designer with the attributes in the Identity Vault.

    • Live Operations > Driver Status: Displays the status of the driver.

    • Live Operations > Start Driver: Starts the driver.

    • Live Operations > Stop Driver: Stops the driver.

    • Live Operations > Restart Driver: Restarts the driver.

    • Simulate: Tests the Schema Map policy. For more information, see Section 7.1.3, Testing Schema Mapping Policies.

Policy Set View Additional Options:

  1. Right-click the Schema Map policy in the Policy Set view.

    • Remove Policy from Set: Removes the Schema Map policy from the policy set, but does not delete the Schema Map policy.

    • Link to Existing Policy: Allows you to browse to another Schema Map policy and link it into the existing policy.

    • Move Up: Moves the Schema Map policy up in the execution order of the policy.

    • Move Down: Moves the Schema Map policy down in the execution order of the policy.

    • Edit: Launches the Schema Map editor. For more information, see Section 7.2.2, Editing the Schema Mapping Policy.

    • Duplicate: Creates a copy of the Schema Map policy.

    • Save As: Saves the Schema Map policy as a .xml file.

    • Simulate: Tests the Schema Map policy. For more information, see Section 7.1.3, Testing Schema Mapping Policies.

    • Export Policy to Configuration File: Saves the Schema Map policy as a .xml file.

    • Live Operations > Deploy the Policy: Deploys the Schema Map policy into the Identity Vault.

    • Live Operations > Compare Policy: Compares the Schema Map policy in Designer to the Schema Map policy in the Identity Vault.

    • Properties: Allows you to rename the Schema Map policy.

    • Delete: Deletes the Schema Map policy.