Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
iconfalse
titleWhat is it for?

AQ_Aggregate_Delete is used for deleting a stored Aggregate (Studio)

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 valuedtrueYes
AggregateIdInputThe attribute that holds the Id of the aggregate you want to delete.Expression resulting in an integerSingle valuedtrueYes
VersionIDInputInputThe Id of the version of the aggregate that is to be deleted.Expression resulting in an integerSingle valuedfalseNo

Deleting

Deleting an entry in the database physically deletes the record. 

UI Text Box
type
Warning

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.

Aggregate definition

Image Removed

Service call definition

Image Added


Aggregate definition

Image Added

ER diagram

Image Removed

Service definition

Image Removed


Visual overview of aggregate concepts

Aggregate