Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


This service will read an aggregate based on an aggregate type and Id. This service consults the database of stored aggregates. It will load the entry with the provided Id. If the Id is not present in the database, the IDError exit is taken. Otherwise, the aggregate entry is loaded into the profile. In case of versioned aggregates, this service will read the aggregate based on aggregate Id in combination with version Id.

Parameters

Name
Direction
Description
Type
Occurrence
Required
AggregateTypeInputSelect the aggregate you want to read. This is a list of the aggregates definitions.AggregateSingle valuedtrue
AggregateIdInputThe attribute that holds the Id of the aggregate you want to read.Expression resulting in an integerSingle valuedtrue
VersionIDInputBidirectionalThe Id of the version to read.Expression resulting in an integerSingle valuedfalse
VersionIDOutputOutputThe attribute on which the Id of the version that is to be read will be stored.AttributeSingle valuedfalse
TargetInstanceOutputThe instance on which the Id of the version that is to be read will be stored in the attribute mentioned in VersionIDOutput.Expression resulting in an instanceSingle valuedfalse

How to - find the AggregateId

The AggregateId of the desired Aggregate can be found for example using a [Editor] Service call type: AQ_Aggregate_Search or by displaying a Container type: AQ_Aggregate_List containing a Button.

Existing instances

When a singleton instance is present in the profile and an aggregate is read which holds this instance, the instances are merged. The merging rules are as follows:

...

Static instances have the same merge behavior.

Events

This service uses default events for a commit and for an exception. The IDError exit should be mapped to a custom event and will be triggered when the given AggregateId cannot be found.

The Unauthorized exit is triggered when the user does not have one of the roles that is set on the aggregate definition.

Example

Below an example is given for a read service with versioning.

ER diagram



Aggregate definition




Service definition

Visual overview of aggregate concepts

Aggregate