Set Attribute Values After You Transform Source Orders

Set the default value for an attribute after you transform the source order.

You can use Visual Information Builder to set the default value before you transform, but you must use Oracle Business Rules to set the value after you transform the source order.

Assume that if the order type is Standard orders, then you must set the default value for the legal entity, and you must do it after you transform the source order.

Summary of the Setup

  1. Get values for your attributes.

  2. Create a posttransformation rule.

  3. Test your setup.

Get Values for Your Attributes

  1. Get the order type and the ID for the legal entity.

    • Do an SQL.

      SELECT distinct LOOKUP_TYPE, LOOKUP_CODE                   
      FROM fusion.FND_LOOKUP_VALUES_TL
      WHERE LOOKUP_TYPE = 'ORA_DOO_ORDER_TYPES'
      order by 1, 2
      
      SELECT DISTINCT NAME, LEGAL_ENTITY_ID
      FROM fusion.HR_LEGAL_ENTITIES
      WHERE upper(name) LIKE '&LEGAL_ENTITY_NAME%'
      ORDER BY name
      

      For details, see Use SQL to Query Order Management Data.

Create a Posttransformation Rule

Create a Posttransformation Rule

Try it.

  1. Go to the Setup and Maintenance work area, then go to the task.

    • Offering: Order Management

    • Functional Area: Orders

    • Task: Manage Posttransformation Defaulting Rules

  2. On the Manage Posttransformation Defaulting Rules page, create a new rule.

  3. Add a check mark to the Advanced Mode option.

  4. In the If area, set the conditions.

    Code

    Description

    Header is a PosttransformationRules.HeaderVO

    Declare the Header variable into the PosttransformationRules dictionary.

    Get values for attributes of the order header that the orchestration process is currently processing from the header virtual object (VO), then store them in the Header variable.

    Header.OrderTypeCode is "Standard Orders"

    Proceed to the Then statement only if the order type on the order header is Standard Orders.

    Make sure you enclose the order type in double quotation marks (" ").

  5. In the Then area, add an Assign action.

    Code

    Description

    Assign Header.LegalEntityId = 300000001563073

    Order Management uses the LegalEntityId attribute to identify the legal entity.

  6. Click Save > Release.

    Learn how to create a business rule. For details, see Overview of Using Business Rules With Order Management.

Test Your Setup

  1. Go to the Order Management work area and create a sales order.

    Attribute

    Value

    Order Type

    Standard Orders

  2. Notice the value in the legal entity attribute.

  3. Click Submit.

  4. Verify that the legal entity now contains 300000001563073.