You are viewing the documentation for Blueriq 15. Documentation for other versions is available in our documentation directory.
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 |
---|---|---|---|---|---|
AggregateType | Input | Select the aggregate you want to delete. This is a list of the aggregates definitions. | Aggregate | Single valued | true |
AggregateId | Input | The attribute that holds the Id of the aggregate you want to delete. | Expression resulting in an integer | Single valued | true |
VersionIDInput | Input | The Id of the version of the aggregate that is to be deleted. | Expression resulting in an integer | Single valued | false |
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.
ER diagram | Aggregate definition |
Service definition |
Visual overview of aggregate concepts
Overview
Content Tools