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

What is it for?

Static instances are used to create predefined, named Instance of Entity with predefined Attribute values

What is it?

An Instance is an actual instantiation of an entity and its associated attributes and/or relations. There are two types: static and dynamic. A static instance is specified in Blueriq Studio. A dynamic instance is created at run-time.

What does it do?

Where an Entity plus Attribute and/or Relation represents the definition of something, an instance represents the actual object.

Suppose the entity ‘Person’ is created with the following attributes:

  • Person.DateOfBirth
  • Person.Age
  • Person.Lastname
  • Person.Firstname

The static instance named ‘MarkOliverEverett’ could look like this:

How to – create a static instance

  1. Select the Home tab

  2. From the Domain group select the Static instance icon
  3. Choose the corresponding Entity
  4. Fill in the required fields
  5. Edit the values for the attribute(s) and or relation(s)
  6. Click Save or Save & close

Below the static instance MarkOliverEverett is connected to the static instance SingerSongwriter of entity Job.


The relation HasJobs is multi-valued, therefore you can select many Jobs.

Properties

Property

Description
Entity

Choose the entity.

Icon

When this entity is not yet created it is possible to create it whilst creating an entity by clicking on the icon create new entity.

NameIdentifies the object. Maximum 50 characters (only letters, numbers and underscores (_)) are allowed.
Functional nameOptional, can be used in documentation
DescriptionIs optional, but recommended
Attribute NameThis column sums up the attributes belonging to the chosen entity
Attribute ValueThis column sums up the attribute type. The value can be edited here and made static.
Relation NameThis column sums up the relations belonging to the chosen entity
Relation ValueThis column sums up the static instances belonging to the related entity


How to – refer to a specific static instance in an expression


It is is possible to refer to a specific static instance in an expression by the name that you gave this static instance in studio. The syntax of this expression is:
  • EntityName[StaticInstanceName].
For example, if you have a static instance Pete of type person, and want to retrieves Pete's name, you can write the expression:
  • Person[Pete].Name


Although you are allowed to change the values of attributes and relations of a static instance at runtime, it is not allowed to delete a static instance at runtime. This results in an error.