Return to Navigation

Configuring Entity Types

This section discusses how to:

Page Name

Definition Name

Navigation

Usage

Entity Type

SCC_ENT_TYPE

select Set Up SACR, then select System Administration, then select Entity, then select Entity Type

Define categories of entities. This allows for more control over how the entity functions.

Implementation

SCC_ENT_TYPE_IMPL

select Set Up SACR, then select System Administration, then select Entity, then select Entity Type, then select Implementation

View the list of entity names set up for an entity type.

Access the Entity Type page (select Set Up SACR, then select System Administration, then select Entity, then select Entity Type).

Image: Entity Type page

This example illustrates the fields and controls on the Entity Type page. You can find definitions for the fields and controls later on this page.

Entity Type page

Field or Control

Definition

Entity Type ID

Displays the auto-generated unique ID.

When you add a new entity type, this field displays the value NOID until you save the record. When you save the new entity type, the field displays the ID that the system assigned to the entity type.

Entity Type Name

Enter the name of the entity type.

The value that you enter here will become a prompt value for the Entity Type field on the Entity Registry page.

Description

Enter the description of the entity registry, primarily for documentation purposes.

Base Class

Enter the base application class that entities, who want to implement this type, should extend for code generation.

If you implement properties, the system uses the Base AppClass to find the baseProps for property generation. baseProps are properties that already exist on the parent and therefore do not need to exist on the child.

For an example of how a Base AppClass is coded, use Application Designer to review the application class SCC_COMMON:ENTITY:BasicEntity.

Note: Most of the code that you can use for entity functionality is located inside the SCC_COMMON:ENTITY:AbstractEntity. At a technical level all the delivered entity types, except Custom, extend AbstractEntity. AbstractEntity provides a lot of the functionality common across entities in the Entity Registry feature. For example, auto handling parent-child relationships, audit fields, save, delete, and so on are all handled by AbstractEntity, because they all function the same regardless of different types of data that entities handle. You will have to override the Entity Type base class if anything has to be customized for a particular type.

See Entity Application Class Reference.

Default Class

Specify the application class that can be used as a default for entities of this type. Entities using the default class cannot have any custom code, but will handle any property setup done through the Entity Registry. Providing a default class makes specifying an application class when creating an entity optional, otherwise it is mandatory.

All entities of this type must extend SCC_COMMON:ENTITY:IEntity. However, their constructor must take two arguments in the signature. The first is the parent entity. The second is the entityID for this entity as a string.

For examples of default classes see the package SCC_COMMON:ENTITY:GENERICS.

Code Generation

Enter the application class that the system uses to generate entity code when you select an Action of Generate Code on the Entity Registry page.

For an example of how an application class used for code generation is coded, use Application Designer to review the application class SCC_COMMON:ENTITY:CODEGEN:EntityGeneratorBase.

If you do not specify the code generation class, the system hides the Generate Code action when you select this entity type on the Entity Registry page.

See Setting Up Entity Registry.

Controlled Via API Only

Select if you want that no entities of the type can be added through the Entity Registry page. When set up via the API certain parts of the entity may be locked for editing through the Entity Registry component.

Use Production Record

Select if the entities tied to this entity type need a production record. If this check box is not selected, the Production Record field is not shown on the Entity Registry page. By default, every entity uses a production record.

Use Stage Record

Select if the entities tied to this entity type need a stage record. A stage record is useful if you want to temporarily store data for validation or processing before moving the data into a production record.

If you do not select this check box, the system does not display the Stage Record field on the Entity Registry page. The Apply Data Update Rule is also disabled because it is only used when stage records are involved.

See Understanding Entity Registry.

Allow Properties

Select if you want to configure the entity properties for all the entities tied to this entity type.

To configure the entity properties, select Edit Properties in the Action field on the Entity Registry page.

If you deselect the Allow Properties check box, the Edit Properties action is not available on the Entity Registry page.

Sync AppClass (Sync Application Class)

Specify an application class to synchronize the properties to the underlying records. While this is mostly needed if the entity type allows properties, you can also sync properties programmatically even if configuring the properties is not allowed. For the latter case, do not select the Allow Properties check box and enter the appropriate sync application class.

For an example of a Sync AppClass, use Application Designer to review the application class SCC_COMMON:ENTITY:PROPERTY:PropertySyncBase.

See Synchronizing Entity Properties.

Entity Type Children

Use this grid to list the Entity Types for which you can add child entities on the Entity Registry page.

On the Entity Registry page, you can add child entities to a parent entity. You can add a child entity only if its entity type is entered in the Entity Type Children grid.

For example, if you create an entity type that uses production and stage records, you could list in this grid other entity types that use this setup. This will allow, in the Entity Registry page, to select child entities that are set up with an entity type different from the parent, but follows the same logic.

For details on how children entities are defined, see Setting Up Entity Registry, “Configuring Entity Registry.”

Rules Engine Data Set and Read Only Entity Types

The Rules Engine Data Set entity type supports entities that are not record based. These entities are purely meant to act as data structures. This version of data sets is used by the rules engine, and controlled via a custom, simplified interface.

See Understanding the Rules Engine.

Read Only entities are essentially basic entities for which save and delete are disabled. They make it easy to create entities on top of records for rules engine access. This makes it easy to add new entities accessible from the rules engine without introducing back door data updates. If at some point proper validation and/or presave logic is added, the entity can be switched to Basic Entity and save and delete would be enabled.

Access the Implementation page (select Set Up SACR, then select System Administration, then select Entity, then select Entity Type, then select Implementation).

Image: Implementation page

This example illustrates the fields and controls on the Implementation page. You can find definitions for the fields and controls later on this page.

Implementation page

Click an Entity link to access the Entity Registry page for the entity.