Instructions
1. Define the instruction interface
[<Interface>]
type IProductInstructions =
inherit IProgramInstructions
// === Query Instructions ===
abstract member GetPrices: (SKU -> Async<Prices option>)
abstract member GetSales: (SKU -> Async<Sale list option>)
abstract member GetStockEvents: (SKU -> Async<StockEvent list option>)
// === Command Instructions ===
abstract member SavePrices: (Prices -> Async<Result<PreviousValue<Prices>, Error>>)
abstract member SaveProduct: (Product -> Async<Result<PreviousValue<Product>, Error>>)
abstract member AddPrices: (Prices -> Async<Result<unit, Error>>)
abstract member AddProduct: (Product -> Async<Result<unit, Error>>)2. Define helper functions
3. Define the workflow interface alias
Comparison with V3
Aspect
V3 (5-step recipe)
V4 (Tagless Final)
Last updated