Relationships between agents and entities

Agents have read and write access to their bound entity, and read-only access to entities that are related to the bound entity.

Bound entity
An agent is linked to a bound entity that it can create, update, or delete. The bound entity is local to the agent, and the agent has direct access to this entity.
Remote entities
The bound entity has relationships to other entities. The agent has indirect access to these related entities. These entities are remote to the agent, and the agent has read-only access to these remote entities. The agent cannot create, modify, or delete remote entities.

The following figure shows a Flight Departure agent that is bound to a Flight entity. This Flight entity has a relationship to an Airport entity. Therefore, the Flight Departure agent has a remote access to the Airport entity, which means that the agent can read the data that is contained in Airport, but it cannot modify the state of this entity.

Remote relationship to entities

To ensure transactional integrity and performance, the programming model must target updates to data that is local to the bound entity.

Before you define relationships between entities, you must think of the lifecycle of each of these entities to avoid testing entities that do not exist. The value of an entity is null if it is not created or if it is destroyed. You must remove the references to the bound entity before the agent destroys it. After the entity is destroyed, it is no longer possible to remove the references to this entity.

The relationships between entities are defined in the business model. The binding from the agent to the entity is done at the agent level, in the agent descriptor.