Table of Contents

Search

  1. Preface
  2. Overview, Downloading, and Installing
  3. Administration API
  4. Identity Service API
  5. Screenflow Programming and SDK
  6. ActiveVOS WSHT API
  7. Embedding Request Forms in Standalone Web Pages
  8. XML-JSON for Process Central

7. APIs, SDKs, and Services

7. APIs, SDKs, and Services

Entity Relationships

Entity Relationships

Defining relationships allows guide designers to read and update data from objects related to the object they are currently operating on. In order for the Guide Designer editor to display these relationships, they must be defined in the entity detail. In the following code example, the
childRelationship
element defines the inverse side of the relationship; in contrast, the owning side of the relationship defines a reference to the relationship by defining a field with a type of
reference
and using its options to define
referenceTo
and
relationshipName
.
Code Example: Sample Contact Object
<host:entityDetail xmlns:host="http://schemas.active-endpoints.com/ appmodules/screenflow/2011/06/avosHostEnvironment.xsd" xmlns:comm="http://schemas.active-endpoints.com/appmodules/ screenflow/2011/07/avosCommon.xsd" name="contacts" label="Contact" labelPlural="Contacts" objectIdField="ContactId"> <host:detail> <host:field label="ContactId" name="ContactId" required="true" type="id"> <host:options> <host:option name="length">36</host:option> </host:options> </host:field> <host:field label="Name" name="Name" required="false" type="string"> <host:options> <host:option name="length">45</host:option> </host:options> </host:field> <host:field label="AccountId" name="AccountId" required="true" type="reference"> <host:options> <host:option name="referenceTo">Account</host:option> <host:option name="relationshipName">ctct_to_acct</host:option> </host:options> </host:field> </host:detail> </host:entityDetail>
If this accounts object was mapped to an SQL database, the
contacts
table would define the foreign key in which contacts
AccountId
references the
accounts
table's
AccountId
column.
At runtime, requests for data from the data services can contain relationship names as part of the field name using the period character as a delimiter between the relationship and field name. For example, a request for a field for an object might be
relationshipName1
, in which case the host provider will need to resolve
relationshipName1
to an object reference and perform a join in order to file the name value. There may be more then one relationship name in the requested field; for example,
relationship1.relationship2.phoneNumber
.