January 2018
Beginner to intermediate
312 pages
7h 22m
English
Let’s start by looking at the input of the workflow.
The input to a workflow should always be a domain object (we’ll assume the input has been deserialized from a Data Transfer Object already). In our case, the object is the UnvalidatedOrder type, which we modeled earlier:
| | type UnvalidatedOrder = { |
| | OrderId : string |
| | CustomerInfo : UnvalidatedCustomerInfo |
| | ShippingAddress : UnvalidatedAddress |
| | ... |
| | } |
We saw at the beginning of the book that a workflow is associated with the command that initiates it. In some sense then, the real input for the workflow is not actually the order form but the command.
For the order-placing workflow, let’s call this command PlaceOrder. The command should contain everything ...
Read now
Unlock full access