Working With Data Model
PeopleSoft database stores the mapping of PeopleSoft application records/fields to OPA data model elements (entities, attributes, relationships).
In a Data Model, you specify the PeopleSoft records and fields that you want to expose to OPA. You assign PeopleSoft records and fields to OPA entities and attributes respectively. Also, you can specify the relationships that exist between the PeopleSoft records.
Select PeopleTools, OPA Administration, Data Model to access the Data Model page.
Application developers use this page to create a data model and map a PeopleSoft record to an OPA entity.
Image: Data Model page
This example illustrates the fields and controls on the Data Model page. You can find definitions for the fields and controls later on this page.
![Data Model page](img/i189ae10cn-7d3a.png)
Field or Control |
Definition |
---|---|
Data Model ID |
The name of the data model. |
Description |
A descriptive name for the data model. |
Seq No |
Sequence numbers are used for numbering purpose only. |
Entity Name |
Specify the OPA Entity Name that is to be assigned for each PeopleSoft record (Record Name). In the Rules Document, the PeopleSoft records are referred to by the Entity Names entered on this page. |
Entity Type |
Valid entity types are:
|
Record Name |
The PeopleSoft record that is mapped to an OPA Entity Name. |
Description |
A descriptive name for the OPA entity. |
Configure Entity |
Click the Configure Entity link if you want to configure an entity. You can set attributes, relationships, and filters for an entity. |
Select PeopleTools, OPA Administration, Data Model, and then click the Configure Entity link.
You use the Entity page to map a PeopleSoft field to an OPA attribute, specify relationships between PeopleSoft records, and set filter conditions.
Setting Attributes
You use the Attributes tab to assign a PeopleSoft field to an OPA attribute.
Image: Entity - Attributes page
This example illustrates the fields and controls on the Entity - Attributes page. You can find definitions for the fields and controls later on this page.
![Entity page](img/i189ae10cn-7d39.png)
Field or Control |
Definition |
---|---|
Seq No |
Sequence numbers are used for numbering purpose only. |
Field Name |
Specify a PeopleSoft field that you want to map to an OPA attribute. In the Rules Document, the PeopleSoft fields are referred to by the OPA Attribute entered on this page. |
OPA Attribute |
Specify an OPA attribute that is mapped to a PeopleSoft field. |
Attribute Data Type |
Valid data types:
|
Response Data Type |
This field is available for any output attribute type such as Global Output, Output, and Input/Output entity types. Valid response data types are:
|
Description |
A descriptive name for the PeopleSoft field and OPA attribute association. |
Setting Relationships
You use the Relationships tab to indicate the relationships between two PeopleSoft records. These relationships will be used to frame rules in OPA between source and target entities.
Image: Entity - Relationships page
This example illustrates the fields and controls on the Entity - Relationships page. You can find definitions for the fields and controls later on this page.
![Entity - Relationships page](img/i398ea5ban-7f13.png)
Field or Control |
Definition |
---|---|
Seq No | |
Target Entity |
The OPA entity assigned to a PeopleSoft record. |
Record Name |
The PeopleSoft record assigned to an OPA entity. |
Entity Type |
Valid entity types are:
|
Relationship Name |
Specify a descriptive name. |
Entity Relationship Type |
Valid relationship types are:
|
Description | |
Configure Relationship |
Click the Configure Relationship link to set the following fields:
|
Setting Filters
Filter conditions provided for each input entity enable the PeopleTools Application Package API—OPA_ADMIN:ProcessRequest—to filter out a sub-set of data rows from each input record and build the ASSESS request message.
Filter tab contains only filter conditions on the attributes of the entity. The actual values for these filter conditions are provided dynamically at run-time when the AE program invokes the OPA_ADMIN:ProcessRequest API.
Image: Entity - Filters page
This example illustrates the fields and controls on the Entity - Filters page. You can find definitions for the fields and controls later on this page.
![Entity - Filters page](img/i398ea5ban-7f12.png)
Field or Control |
Definition |
---|---|
Seq No |
The order in which you provide the filter conditions on this page is the order in which you should provide the filter values when invoking the OPA_ADMIN:ProcessRequest API. |
Field Name |
Specify a field from the input record for which you want to specify a filter condition. |
Field Operator |
PeopleSoft supports the commonly used field operators. |
Note: The filter values provided in the AE program for the filter conditions should be as per the base language.
Example
import OPA_ADMIN:ProcessRequest;
Local Rowset &rsFilters = CreateRowset(Record.OPA_ENT_FILTERS);
&rsFilters.GetRow(1).OPA_ENT_FILTERS.OPA_SEQ_NBR.Value = "1";
&rsFilters.GetRow(1).OPA_ENT_FILTERS.OPA_ENTITY_NAME.Value = "ORDER_ITEM";
&rsFilters.GetRow(1).OPA_ENT_FILTERS.FIELDNAME.Value = "TST_RD_ITM_BRAND";
&rsFilters.GetRow(1).OPA_ENT_FILTERS.OPA_FILTER_VALUE.Value = "Soft Stuff";
&rsFilters.InsertRow(1);
try
Local OPA_ADMIN:ProcessRequest &processReq = create OPA_ADMIN:ProcessRequest("RD_DATAMODEL", "RetailDiscounts",
&rsFilters);
catch Exception &e
MessageBox(0, "", 0, 0, "Got Exception from OPA Process Request: " | &e.ToString( False));
end-try;