Value Object
A Value Object encapsulates one or multiple primitive values to ensure only valid values can enter your domain.
Value Objects do not contain an identifier. The equality of two value objects can be determined by comparing the primitive values of its properties.
Add to property
Value Objects can be assigned to properties of a Command Payload Schema, an Aggregate State Schema and an External System Output Schema.
Plan the Schema a Use Case Element, e.g. like in the image below for an Aggregate State.
Add a new property or edit an existing property
- Click the edit icon on the right of the 'title' attribute, e.g. the 'title' property.
- Alternatively: Click the plus to add a new property
Create a new Value Object
- Click the plus button next to the dropdown 'value object'.
Skip this step if the Value Object exists and will be assigned to a second property.
- Type the Value Object name in the name input of the sub menu, e.g. 'title'.
- Select a data type for the Value Object.
- Click the checkmark icon to create the new Value Object.
- Click the cross cancel the Value Object creation.
- Ensure the new created Value Object is selected in the value object dropdown.
- Click the checkmark icon to create the new property or save the edited.
- Click the cross cancel the property creation or editing.
Command with changed name, new properties and value objects