You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

What is it for?

Relations define possible associations between instances of entities.

What is it?

A relation describes the association between two entities. The relation is reversible; from entity1 towards entity2 and from entity2 towards entity1. This reverse relation is required.

For instance, if ‘Person’ and ‘Job’ are both entities, a relation ‘HasJobs’ can be created from ‘Person’ to ‘Job’. The reverse relation ‘IsOfPerson’ can be created from ‘Job’ to ‘Person’.

Properties

PropertyDescription
From entity

Choose the entity from which the relation originates.

Forward relation nameName of the relation.
Multi-valuedTick this box if the relation can be multi-valued.
To entity

Choose the entity the relation points to.

Backward relation nameName the reverse relation.
Multi-valuedTick this box if the reverse relation can be multi-valued.
Default valueUsing the default value to set a relation will cause the inference engine to automatically determine the instances linked in the relation. You are able to create an expression here to select these instances.
Question textFill when the relation should be visible to the user.
Explain textProvides additional explanatory text.
ValidationsChoose one or more validation rules or validation types. Validations check the correctness of the input for that relation at run-time. First you have to create a validation rule in order to be able to choose it here. 

Creating and maintaining relations

Relations between instances can be created and maintained in several ways.

Service calls

Relations can be managed using the following service calls:

  • Service call type: AQ_Instance_Create
  • Service call type: AQ_Instance_Update

Adding a relation to a containment

By adding a relation to a Page or Container, a 1:1 relation can be created and/or read out between active instances or between an active instance and a newly created instance.

Default value

Using the default value to set a relation will cause the inference engine to automatically determine the instances linked in the relation. Take note when using the relation its default expression is evaluated to determine all instances that will be present in the relation. The truth maintenance system ensures that any change in the profile that affects the outcome of the expression will cause the relation to be re-evaluated.

Manually setting the relation will take precedence over the inferred instances (inferred value is system set, using services to set the relation makes it user set).

Reverse relation

We strongly discourage using the reverse relation of relations with a default value in any way, as this can cause performance issues.

  • No labels