Account

open class Account

An aggregate root written in Java. Its decide functions are plain Java methods: they return the event they produce, and reject a command by throwing a RejectedException of a Rejection. A Java decide function cannot call the suspend functions of the API, such as DecideScope.reserve, and the test DSL is Kotlin, so the tests of a Java domain are Kotlin.

Constructors

Link copied to clipboard
constructor(state: AccountState)

Functions

Link copied to clipboard
open fun onCommand(command: Deposit): Deposited
open fun onCommand(command: OpenAccount): AccountOpened
open fun onCommand(command: Withdraw): Withdrawn