We’ve now got a way to model all the data structures—the “nouns” of the ubiquitous language. But what about the “verbs,” the business processes? In this book, we will model workflows and other processes as function types. For example, if we have a workflow step that validates an order form, we might document it like this:
|||type ValidateOrder = UnvalidatedOrder-> ValidatedOrder|
It’s clear from this code that the ValidateOrder process transforms an unvalidated order into a validated one.
Every function has only one input and one output, but some workflows might have multiple inputs and outputs. How can we model that? We’ll start with the outputs. If a workflow has an ...