Business Object Type
data class BusinessObjectType(val name: String, val stateMachine: StateMachine? = null, val attributes: Set<Attribute> = emptySet())
Represents a BusinessObjectType in the Merode Model.
Parameters
name
The name of the BusinessObjectType.
state Machine
The StateMachine defining the behavior of the BusinessObjectType instances (BusinessObjects).
attributes
The user-defined Attributes of the BusinessObjectType, representing its data structure
Constructors
Link copied to clipboard
Creates a new BusinessObjectType with the provided name and attributes (empty by default). The created BusinessObjectType will not have a StateMachine. It must be set using the stateMachine method.
constructor(name: String, stateMachine: StateMachine? = null, attributes: Set<Attribute> = emptySet())
Functions
Link copied to clipboard
Link copied to clipboard
This method enables the creation of instances of this BusinessObjectType. It should be used to create new BusinessObjects of this BusinessObjectType to which no Event has been applied yet.
operator fun invoke(id: Long, state: State = State.Initial, props: Map<String, Any?> = emptyMap()): EitherNel<InstanceError, BusinessObject>
operator fun invoke(id: Long, state: State, masters: Map<String, BusinessObject>, vararg propsValues: Any?): EitherNel<InstanceError, BusinessObject>
Link copied to clipboard