Enabling object attributes for an OpenEdge Data Object

This topic describes how to enable object attributes in OpenEdge.

In OpenEdge, you create a Business Entity and generate your Data Service Catalog when you create the Data Object Service from it. A Business Entity is an ABL class or procedure object that implements a service interface that provides client access to data and business logic running on an OpenEdge application server. In Platform, you use the Data Service Catalog to create Platform external objects associated with OpenEdge Data Objects. For an OpenEdge Data Object to support object attributes, you must code your OpenEdge Business Entity in a way that includes the fields required to enable the object attributes. For information about object attributes, see Object attributes.

To enable object attributes for an OpenEdge Data Object:

  1. Decide which object attributes you must enable for your OpenEdge Data Object.
  2. In OpenEdge, build a Business Entity to implement the Data Object for an ABL temp-table that consists of the required fields for all the object attributes. This is done using the information provided in the table below.
  3. In Platform, using a Data Service Catalog that defines the schema for this Data Object, create a Platform external object associated with the OpenEdge Data Object (see Linking Platform external objects to OpenEdge data).
  4. Edit the Platform external object definition to include the required object attributes by selecting each object attribute and mapping the available fields required to set the object attribute.

The following table lists all the object attributes supported in an OpenEdge Data Object and the corresponding fields required in the Data Service Catalog:

Object attribute Platform fields to map to OpenEdge fields Data type of the field
Workflow Process CHARACTER
  Status CHARACTER
Contact First Name CHARACTER
  Middle Name CHARACTER
  Last Name CHARACTER
  Email CHARACTER
  Fax CHARACTER
  Phone CHARACTER
Location Street Address-1 CHARACTER
  Street Address-2 CHARACTER
  City CHARACTER
  State/Province CHARACTER
  Country CHARACTER
Event Event Subject CHARACTER
  Duration INT64
  Date/Time DATETIME-TZ
  Private LOGICAL
  Description CHARACTER
  Location CHARACTER
  Pop-up Reminder CHARACTER
  Reminded LOGICAL
Task Task Subject CHARACTER
  Due Date DATETIME-TZ
  Priority INTEGER
  Private LOGICAL
  Description CHARACTER
Multi-Currency Currency Code CHARACTER
  Rate Date DATE
Lockable Is Locked LOGICAL
Document Document File CHARACTER
  Description CHARACTER

You can selectively map the OpenEdge fields in the OpenEdge Data Object resource for a given Platform external object to the corresponding Platform fields based on which object attributes you need in your Platform external object. The field names can be of your choice but you must ensure that the number of fields (and their respective OpenEdge data types) required for enabling an object attribute conforms to the information provided in the above table. For example, to enable the Multi-Currency object attribute, you must have two available fields in your Data Object resource (one to store Currency Code and another to store Rate Date).

Example:

To enable the Workflow attribute for your OpenEdge Data Object, add two temp-table fields, such as PROCESS_ID and STATUS_ID, of CHARACTER data type in your OpenEdge Business Entity. The following is a section of a Data Service Catalog file (.json) that includes the two example fields:

    "version": "1.2",
    "lastModified": "Thu Oct 30 03:03:24 PDT 2014",
    "services": [{
        "name": "WorkflowobjService",
        "address": "\/rest\/WorkflowobjService",
.
.
.
"PROCESS_ID": {
                                    "type": "string",
                                    "ablType": "CHARACTER",
                                    "default": "",
                                    "title": "PROCESSID"
                                },
"STATUS_ID": {
                                    "type": "string",
                                    "ablType": "CHARACTER",
                                    "default": "",
                                    "title": "STATUSID"
                                },
.
.
.

After you have created a Platform external object associated with the OpenEdge Data Object (see Linking Platform external objects to OpenEdge data), edit your object definition (see Viewing and editing an Object Definition) to add the Workflow attribute and map the PROCESS_ID and STATUS_ID fields to Workflow Process and Workflow Status: