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

What is it for?

AQ_Aggregate_Search is used for finding an Aggregate based on its metadata or custom metadata

What does it do?

AQ_Aggregate_Search retrieves the Aggregate Id(s) belonging to the found aggregates and stores this in an attribute, ready for use by (for example) Service call type: AQ_Aggregate_Read.

Parameters

Parameter
Direction
Value
Description
Required
Aggregate typeInputModule element AggregateSelect the aggregate type to search.True
Target entityOutputEntity

Select an entity in which you want to store the aggregate ID and version.

If this entity is a singleton, no instances will be created and the next two parameters will be used to contain Id and version of the found aggregates.

If this entity is a multiton, an instance is created for each found aggregate and the next two parameters will contain single values.

Instances of the specified multiton are deleted before the search is run. Each search is performed with a clean slate.

True
Target attribute for aggregate IdOutputAttribute of target entitySelect an attribute of the target entity on which attribute you want to store the found aggregate Id.
This attribute can be singlevalued or multivalued.
True
Target attribute for version IdOutputAttribute of target entity

Select an attribute of the target entity on which attribute you want to store the found version Id.
This attribute can be singlevalued or multivalued.

False

Only search for latest versionsInputCheckbock, checked by defaultCheck when only latest versions of versioned aggregates are searched.False
Maximum resultsInputIntegerThe maximum number of results, the system will stop after reaching this number.False
Search criteriaInputStandard and custom metadata fieldsSpecify the search criteria, based on standard and custom metadata fields.True
When searching for aggregates with versions, placing the found aggregate Id's in a multivalued attribute of a singleton and placing the found version Id's in another multivalued attribute of that singleton results in an information gap: it cannot be reproduced which version Id's belong to which aggregate Id's. Therefore, it is possible to let Blueriq create an instance for each found aggregate. See How to search for aggregates.

Search criteria

The search criteria are all triples that adhere to the pattern <metadata><operator><value>. The value can be single or multi, depending on the operator. See the list below.

Operator
Used with metadata of type
Value can be
EqualsAll single-valued datatypesSingle value
Not equalsAll single-valued datatypesSingle value
Less thanAll single-valued datatypesSingle value
Less than or equalsAll single-valued datatypesSingle value
Greater thanAll single-valued datatypesSingle value
Greater than or equalsAll single-valued datatypesSingle value
LikeStringSingle value
Not likeStringSingle value
InAll multivalued datatypesMultivalued
Not inAll multivalued datatypesMultivalued

Events

This service uses two events for a commit and one for an exception:

  • FoundNoAggregates: typically this node will go to a page with a not-found-message and is of type Rollback.
  • FoundOneAggregate: typically this note will continue in flow with the found aggregate and is of type CommitSkipSkipValidate (default exit).
  • FoundMultipleAggregates: typically this node will result in an aggregate list containing all found aggregates and is of type CommitSkipValidate.
  • Unauthorized: This exit is triggered when the user does not have one of the roles that is set on the aggregate definition.

Tracing

Searching aggregates is not traced, just like reading aggregates (using Service call type: AQ_Aggregate_Read).

Visual overview of aggregate concepts

Aggregate