This chapter describes administering extensions, setting up custom attributes to extend the TCA Registry.
This chapter covers the following topics:
Extend the Oracle Trading Community Architecture (TCA) Registry by creating an unlimited number of user-defined attributes. TCA extensions use the extensibility framework and features from Oracle Product Lifecycle Management (PLM). See: User-Defined Attributes, Oracle Product Lifecycle Management User's Guide.
You can create groups of extended attributes for these objects, the TCA entities:
Locations (HZ_LOCATIONS)
Organization Profiles (HZ_ORGANIZATION_PROFILES)
Party Sites (HZ_PARTY_SITES)
Person Profiles (HZ_PERSON_PROFILES)
Associate functions and actions with attribute groups to use custom logic and determine end user interaction. Assign attribute groups to pages so that the attributes are displayed in specific UI pages.
Note: TCA extensions administration does not use the PLM security model or TCA Data Sharing and Security. TCA attributes that you extend can be used only in Oracle Customers Online.
If you also use profile versioning, schedule programs to periodically synchronize the extensions data with organization or person profile records. See: Copying Extensions Data for Profile Versioning.
Related Topics
Introduction to Administration
Create detailed plans of user-defined attributes and their usage in user interfaces, as well as any functions.
Select the entity that you want to extend.
Value Sets: Create value sets for attributes validation, if needed. See:
Creating Value Sets, Oracle Product Lifecycle Management User's Guide
Defining Table Value Sets, Oracle Product Lifecycle Management User's Guide
Creating Independent Values, Oracle Product Lifecycle Management User's Guide
Attribute Groups: Create the attribute group and add attributes to the group, including any corresponding value sets. See: User-Defined Attributes, Oracle Product Lifecycle Management User's Guide.
Important: The PLM view and edit privileges are not used for extending TCA attributes.
Note: After you save attributes, you cannot change the data type. You also cannot delete the attributes from the TCA Registry. You can, however, disable them so that they are not displayed in user interfaces.
Functions: Define functions, if needed. See: Creating User-Defined Functions, Oracle Product Lifecycle Management User's Guide.
To add parameters to the function after it is created, click the name of the function in the main Functions page. You open the function details, which includes parameters and usages.
Associations: Click Add Attribute Groups and select the group, with the entity as the data level. This association is needed before you can assign the groups to pages.
If needed, back in the main Associations page, click Update Actions for the attribute group and create actions to link functions to the attribute group and entity combination. After the action is created, map function parameters to attributes by clicking the action name in the Actions page. You open the action details, including the function mappings.
Important: The PLM security privileges are not used for extending TCA attributes.
Pages: Create a page and add the attribute group for the group to be used in user interfaces that leverage the page.
Note: The attribute group and page are automatically associated with the Administrator Defined classification.
Related Topics
You need to store eye color, hair color, and body measurements for persons in the TCA Registry, for a UI in which users can update person profiles. You also need to let users calculate the body mass index based on the entered weight and height.
Plan out the attributes, including data type, range of values, specific values, and UI display method. These tables show the planning for this example.
Attribute | Data Type | Values Range | Values | Display | Required |
---|---|---|---|---|---|
Eye Color | Character | None |
|
List of Values | No |
Hair Color | Character | None |
|
List of Values | No |
Attribute | Data Type | Values Range | Values | Display | Required |
---|---|---|---|---|---|
Height | Number | 1 - 100 | None | Text | No |
Weight | Number | 1 - 1000 | None | Text | No |
Body Mass Index | Number | 1 - 100 | None | Text | No |
Plan out the function and action for calculating the body mass index. This table shows the questions and answers for this example.
Question | Answer for This Example |
---|---|
Which attributes are functions of other attributes? | The Body Mass Index attribute is a function of the Height and Weight attributes. |
What type of function is this: Java, PL/SQL, or URL? | PL/SQL. |
Select Person Profiles as the entity to extend.
Create value sets for the attributes. This table shows what you define for this example.
Value Set Name | Data Type | Maximum Size | Validation Type | Display Type | Value Range |
---|---|---|---|---|---|
EyeColor | Char | 6 | Independent | List of Values | Not Applicable |
HairColor | Char | 6 | Independent | List of Values | Not Applicable |
Height | Number | 3 | None | <Not Applicable> | Minimum Value: 1 Maximum Value: 100 |
Weight | Number | 4 | None | <Not Applicable> | Minimum Value: 1 Maximum Value: 1000 |
This table shows what you add as specific values for the HairColor value set. You would accordingly enter values for EyeColor, based on your plan.
Value | Enabled | Sequence | Start Date |
---|---|---|---|
Black | Yes | 1 | <System date> |
Brown | Yes | 2 | <System date> |
Blonde | Yes | 3 | <System date> |
Gray | Yes | 4 | <System date> |
Red | Yes | 5 | <System date> |
Other | Yes | 6 | <System date> |
Create the attribute groups. This table shows what you define for this example.
Internal Name | Display Name | Multi-Row |
---|---|---|
PHYSICAL_CHAR | Physical Characteristics | No |
BODY_MEASURE | Body Measurements | No |
Add attributes to each group, as presented in these tables.
Internal Name | Display Name | Sequence | Data Type | Column | Enabled | Required | Display As | Value Set | Default Value |
---|---|---|---|---|---|---|---|---|---|
EYE_COLOR | Eye Color | 1 | Char | C_EXT_ATTR1 | Yes | No | Text Field | EyeColor | Brown |
HAIR_COLOR | Hair Color | 2 | Char | C_EXT_ATTR2 | Yes | No | Text Field | HairColor | Brown |
Internal Name | Display Name | Sequence | Data Type | Column | Enabled | Required | Display As | Value Set | Default Value |
---|---|---|---|---|---|---|---|---|---|
HEIGHT | Height | 1 | Number | N_EXT_ATTR1 | Yes | No | Text Field | Height | None |
WEIGHT | Weight | 2 | Number | N_EXT_ATTR2 | Yes | No | Text Field | Weight | None |
BMI | Body Mass Index | 3 | Number | N_EXT_ATTR3 | Yes | No | Text Field | None | None |
Create a function to calculate the body mass index.
Write the custom PL/SQL for the calculation. For this example:
PACKAGE XX_EXT_TEST AS FUNCTION CALC_BMI (p_weight in NUMBER, p_height in NUMBER) RETURN NUMBER; END XX_EXT_TEST; PACKAGE BODY XX_EXT_TEST AS FUNCTION CALC_BMI (p_weight in NUMBER, p_height in NUMBER) RETURN NUMBER IS l_bmi number; BEGIN l_bmi := trunc((p_weight*703) / (p_height*p_height)); dbms_output.put_line('BMI = '||l_bmi); -- for testing return l_bmi; END; END XX_EXT_TEST;
Run the PL/SQL package in your custom schema and create a synonym for this package in the APPS schema.
Define the function in the extensions administration.
Internal Name: CALC_BMI
Display Name: Calculate BMI
Function Type: PL/SQL
Package: XX_EXT_TEST
Procedure: CALC_BMI
Enter function parameters as shown in this table.
Sequence | Internal Name | Display Name | Data Type | Parameter Type |
---|---|---|---|---|
1 | p_weight | Weight | Number | Input |
2 | p_height | Height | Number | Input |
3 | x_bmi | Body Mass Index | Number | Return Value |
Add both attribute groups and associate them with the Person Profiles data level.
For the Body Measurements attribute group, create an action for calculating the body mass index:
Sequence: 1
Action Name: Calculate BMI
Function: Calculate BMI
Execution Method: User Action
Display Style: Button
Prompt Application: Customers Online
Prompt Message Name: XX_CALC_BMI_MSG
Note: You need to define the message to use as the prompt, in this case, the text that appears on the button. See: Define Your Messages, Oracle Applications Developer's Guide.
Visible: Yes
Important: The PLM security privileges are not used for extending TCA attributes.
Map the function parameters to attributes, as shown in this table.
Parameter Name | Mapped To | Mapped Attribute |
---|---|---|
Weight | Attribute Group | Weight |
Height | Attribute Group | Height |
Body Mass Index | Attribute Group | Body Mass Index |
Create a page and assign both attribute groups to it. For this example, you enter:
Display Name: Person Physical Information
Internal Name: PERSON_PHYSICAL_INFO
Sequence: 10
Data Level: Person Profiles
Attribute Groups
Sequence: 10, Display Name: Physical Characteristics
Sequence: 20, Display Name: Body Measurements
Related Topics
Use the Copy Organization Extensions Data for Profile Versioning and Copy Person Extensions Data for Profile Versioning programs to synchronize organization or person profile extensions with the corresponding party profile records.
If the HZ: Profile Version Method for Updates profile option is set to New Version or One Day Version, when party profiles are updated, the existing profile record can be set with an end date, and a new profile record created with the newly entered information. In the extensions tables, the programs copy extensions data associated with the old profile ID and create new rows associated with the new profile record.
For example, the old organization profile ID is 123, and there are five rows in the HZ_ORG_PROFILES_EXT tables with extended attribute values for that profile. For those five rows, the ORGANIZATION_PROFILE_ID column value is 123. The user updates the profile record and creates a new version with identifier 456. The extensions data, however, is still linked to record 123. When the Copy Organization Extensions Data for Profile Versioning program runs, it copies the extensions data for 123 and creates new extensions records with ORGANIZATION_PROFILE_ID column as 456.
If the profile option is set to New Version or One Day Version, run these programs after:
Bulk Import, including D&B batch loading and import in Oracle Customers Online and Oracle Customer Data Librarian. See:
Bulk Import Overview, Oracle Trading Community Architecture User Guide
Import Overview, Oracle Customers Online User Guide
Import Overview, Oracle Customer Data Librarian User Guide
Running Customer Interface. See: Customer Interface, Oracle Trading Community Architecture User Guide.
Running the Third Party Data Integration Update program. See: Third Party Data Integration Update Program.
You update party profiles with other methods and notice that the extensions data is not synchronized.
You do not need to run these programs when party profiles are directly updated through the user interface in any application.
Set the HZ: Profile Version Method for Updates profile option to New Version or One Day Version. See: Profile Options and Profile Option Categories.
Set up extended attributes for organization or person profiles. See: Extensions Process.
Batch Size: Enter the number of records to process at one time.
Number of Workers: Enter the number of parallel workers that you want to use for this program. Workers are processes that run at the same time to complete a task that would otherwise take longer with a single process.
Related Topics