Versions Compared

Key

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

In many situations, end users are interested in statistics about aggregates.
For instance, regarding all person-aggregates, how many men and how many women are currently present?

To make this possible, the container AQ_Statistic_Aggregate is available. This container will always result in an a positive integer (zero or more0, 1 ,2 etc).
Multiple containers of this type can then be , that can be used together with the container AQ_Statistics_Visualization [9.6]Finding an aggregate means that the Id is not known at the moment, retrieving it means that the Id is known and the aggregate can be read from the aggregate database directly. However, when an end user enters an application (or logs in), the application may not know which aggregates belong to or are applicable for this end user.

Therefore, the AQ_Aggregate_Search service is available, that finds aggregate Ids, given one or more parameters.

Screen

Screen

Image AddedImage Removed

Parameters

Parameter
Direction
Value
Description
Required
Aggregate typeInputModule element AggregateSelect the aggregate type to searchcreate a statistic for.True
Target entityOutputNon-singleton entitySelect an entity for which you want to create an instance for each found aggregateTrue
Target attribute for aggregate IdOutputAttribute of aforementioned entitySelect an attribute of the aforementioned entity on which attribute you want to store the found aggregate IdTrue
Target attribute for version IdOutputAttribute of aforementioned entitySelect an attribute of the aforementioned entity on which attribute you want to store the found version Id

False

Only search for latest versionsInputCheckbock, checked by defaultCheck when only latest versions of versioned aggregates are searchedFalse
Maximum resultsInputIntegerThe maximum number of results, the system will stop after reaching this numberFalse
Search criterium lineInputLineCreate lines for each condition.At least one line
 SearchCriteriaInputStandard metadata or Custom metadataChoose between the two types of metadata fields.within a line: True
 MetadataInputStandard or Custom metadata fieldThe field that is part of the search criterium.within a line: True
 OperatorInputSee table belowThe operator that connects the field and the value.within a line: True
 ValueInputExpressionThe expression used in the search criterium.within a line: Search criteriaInputStandard and custom metadata fieldsSpecify the search criteria, based on standard and custom metadata fields True

Search criteria

The search criteria are all triples that adhere to the pattern <metadata><operator><value><MetadataField><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.

Tracing

Example

The statistic in the example screen above is combined with the two statistics below.

Image AddedImage Added

 

 

 

 Searching aggregates is not traced, just like reading aggregates (using AQ_Aggregate_Read).