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

What is it for?

AQ_Aggregate_Delete is used for deleting a stored Aggregate

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

Parameters

Name
Direction
Description
Type
Occurence
Required
AggregateTypeInputSelect the aggregate you want to delete. This is a list of the aggregates definitions.AggregateSingle valuedYes
AggregateIdInputThe attribute that holds the Id of the aggregate you want to delete.Expression resulting in an integerSingle valuedYes
VersionIDInputInputThe Id of the version of the aggregate that is to be deleted.Expression resulting in an integerSingle valuedNo

Deleting

Deleting an entry in the database physically deletes the record. 

The AggregateId is leading.  If the Id is found but does not match the AggregateType, then the instance corresponding the Id will be deleted!

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 delete service with versioning.

Service call definition


Aggregate definition


Visual overview of aggregate concepts

Aggregate