Page History
Tags | Persistency, Interaction, DCM |
Type of accelerator | Example project to demonstrate Blueriq functionality and accelerate your learning journey. |
How to get | |
Compatibility | Blueriq 16.0 and higher |
Description
To get this project working, the aggregate plugins and properties need to be set correctly. See for installation details this page.
This example project aims
Table of contents
Table of Contents |
---|
Info |
---|
Example projects are Blueriq models which demonstrate Blueriq functionality. They are included in the standard Blueriq library which is shipped with Blueriq. You can view, run and extend these projects by creating a new project and use an example project as a starting point. |
The example project Career is a project that is used to demonstrate the functionality regarding persistency management. The following subjects play a role in this example project:
- Aggregate design (see also AggregatesAggregate)
- Singleton versus non-singleton
- Custom metadata
- Versioning
- Displaying aggregates in a list (see also Container type: AQ_Aggregate_List)
- Creating an aggregate (see also Service call type: AQ_Aggregate_Create)
- Reading an aggregate (see also Service call type: AQ_Aggregate_Read)
- Updating an aggregate (see also Service call type: AQ_Aggregate_Update)
- Deleting an aggregate (see also Service call type: AQ_Aggregate_Delete)
...
- Searching for an aggregate (see also Service call type: AQ_Aggregate_Search)
For more information on persistency management design see also Persistency Management guide.
...
The example project Career consists of two parts. The first part is about a single person and his jobs. The second part is deals with a non-singleton entity Course.
Contents of the example project
Person aggregate
The aggregate Person consists of the entities Person and Job, but the definition only contains Person. Aggregate functionality automatically creates, reads, updates and deletes all entities that are connected to the entitiy entity that is defined in the aggregate definition.
An exposed flow PersonManagement is available to manage person aggregates. As mentioned before, a person aggregate consists of a single person, with zero or more jobs attached to it.
Version management is enabled in the create, read, update and delete services so multiple version of an aggregate are available, as shown in the aggregate list below.
As can be seen in the example project, custom metadata fields can be defined for an aggregate. In the person example, the custom metadata fields FullName, Age and NrOfJobs have been added to the person aggregate. The first is a concatenation of two existing attributes, the second is a plain attribute and the third custom metadata field is a calculation of the number of jobs attached to the person entity.
CourseGroup aggregate
The course group aggregate only consist of the entity Course, which is a non-singleton. The create service for the aggregate CourseGroup is defined in such a way, that it is possible to save more than one course in such an aggregate. An exposed flow CourseGroupManagement is available to manage course group aggregates, as shown below.
A course has a duration in number of days and a price in euros. Custom metadata fields have been defined within the course group aggregate to summarize the number of days and the price and count the number of courses for each course group aggregate. Versioning has been disabled in this part of the example, so only the latest version of each aggregate is available.