Adding Field Mapping Templates for Flexible Object Mapping: Example

This example shows how to create field mapping templates for conditionally converting Roles to Resources in Gateway using flexible object mapping.

Scenario:

An organization wants to perform a 1-1 Role conversion from Sample to P6 with the exception: all software development roles that contain the RoleId, "DEV" must be created as Resources in P6 instead. To ensure all roles in Sample are either converted to Resources or retained as Roles in P6 based on the condition, you will need to create a field mapping template on the destination side, in this case, Gateway , for the Role and the Resource objects as follows:

Prerequisites

Procedure A - Create a Mapping Template for Resource Object

Create a new field mapping template for the Resource business object on the destination side (based on the object mapping, Gateway and P6) to conditionally convert RoleIds containing "DEV" to Resources as follows:

  1. In the sidebar, select Configuration.
  2. Select the Field Mapping Templates tab.
  3. From the Select Business Object list, select the business object on the destination side, Resource, and then select Add....
  4. In the General step of the Template wizard:
    1. Enter a Template Name, Role To Resource Object Mapping Template.
    2. Select Template Type as Direct.
    3. Set Provider 1 as Sample.
    4. Set Provider 2 as P6.
    5. Select Object 1 as Role.
    6. Select Object 2 as Resource.
    7. Select Use Criteria Step to define the condition for converting Roles to Resources.
  5. In the Criteria step, enter the condition to select only roles that contain the string "DEV" in Sample (source) and P6 (destination) as follows:
    1. In the Provider 1: Sample section, select the the fields and enter a condition as follows:
      1. In the Fields field, select RoleId for the Role business object.
      2. In the Condition dialog box, enter the condition: return [RoleId].startsWith("DEV");
      3. Select the Validate Condition to confirm.
    2. In the Provider 2: P6 section, select the down-arrow button to select the fields.
      1. In the Fields field, select Id for the Resource business object.
      2. In the Condition dialog box, enter the condition: return [Id].startsWith("DEV")
      3. Select the Validate Condition to confirm.
  6. In the Mappings step, enter field mappings between Sample, Gateway, and P6 that needs to be created by the template.
    1. Select the following business object and field in each provider:

      Sample: Select RoleName and RoleId.

      Gateway: Select Name and Id.

      P6: Select Name and Id.

    2. Select Add.
  7. In the Summary step, review the template summary and select Save or select Back to update the field mapping template.

    The Role to Resource Object Mapping Template will now be available in the Field Mappings tab of Gateway's Resource object in the Business Flow wizard.

Procedure B - Create a Mapping Template for Role Object

Create a second field mapping template for the Role business object on the destination side (based on the object mapping, Gateway and P6) for a 1-1 mapping for those RoleIds in Sample that do not contain "DEV".

  1. In the sidebar, select Configuration.
  2. Select the Field Mapping Templates tab.
  3. From the Select Business Object list, select Role, and then select Add...
  4. In the General step of the Template wizard:
    1. Enter the Template Name, Role To Role Object Mapping Template.
    2. Select Template Type as Direct.
    3. Set Provider 1 as Sample.
    4. Set Provider 2 as P6.
    5. Select Object 1 as Role.
    6. Select Object 2 as Role.
    7. Select Use Criteria Step to define the condition for Roles that cannot be converted to Resources.
  5. In the Criteria step, enter the condition to select only roles that do not contain the string "DEV" as follows:
    1. In the Provider 1: Sample section, select Click to Choose.
      1. Pick the fields RoleId in the Role business object that will be used to specify the condition, and then select Add Fields.
      2. In the Condition dialog box, enter the following condition: return ![RoleId].startsWith("DEV");
      3. Select the Validate Condition to confirm.
    2. In the Provider 2: P6 section, select Click to Choose.
      1. Pick the fields Id in the Role business object that will be used to specify the condition, and then select Add Fields.
      2. In the Condition dialog box, enter the following condition: return ![Id].startsWith("DEV")
      3. Select the Validate Condition to confirm.
  6. In the Mappings step, enter the field mappings between Sample, Gateway and P6 that needs to be created by the template.
    1. Select the following business object and field in each provider:

      Sample: Select RoleName and RoleId

      Gateway: Select Name and Id.

      P6: Select Name and Id.

    2. Select Add.
  7. In the Summary step, review the template summary and select Save or select Back to update the field mapping template.

    The Role to Role Object Mapping Template will now be available in the Field Mappings tab of Gateway's Role object in the Business Flow wizard.

Step me through...

Adding Flexible Object Mappings: Example

Learn more about...

Setting Up Flexible Object Mappings

Adding or Editing Field Mapping Templates



Legal Notices | Your Privacy Rights
Copyright © 2013, 2022

Last Published Thursday, October 6, 2022