Previous Topic: Add Relationship ActionsNext Topic: DISASSOCIATE Entities


ASSOCIATE Entities

After you CREATE an entity, you build its identifying relationship memberships using ASSOCIATE. The entity being associated must be one the Action Diagram recognizes through a CREATE or READ. ASSOCIATE establishes a pairing along a relationship between two entities. You ASSOCIATE entities when the relationship is optional, and you must ASSOCIATE them (before the end of the elementary process) when the relationship is mandatory.

Important! Do not attempt to ASSOCIATE entities that have a mutually exclusive relationship in the Data Model. This can cause the application to end abnormally because code is generated to enforce the mutually exclusive condition.

ASSOCIATE can appear as a clause in either CREATE or UPDATE action statements. The following CREATE statement shows an example of ASSOCIATE action:

CREATE received product
SET code TO "RECD"
ASSOCIATE WITH processing warehouse WHICH holds IT

You can also create a standalone ASSOCIATE action. It operates the same as the relationship clauses in the CREATE and UPDATE, with one exception: in relationship clauses, the subject of the clause is always the subject of the entity action. In a standalone relationship action, you explicitly specify the subject of the action.

The following example shows a standalone ASSOCIATE action:

ASSOCIATE existing product
WITH processing warehouse WHICH holds IT