State Machine - advanced
The State Machine can be injected to the Event Handler script or API.
The State Machine can be injected to the Event Handler script or API.
You define your State Machine as a specific type of Event Handler.
State Machines are defined as Event Handlers in your application's eventhandler.kts file. Ensure that your Event Handler is correctly configured for runtime.
The following example of a State Machine defines five events that control the transition of trades from one state to another.
One of the key things you need to define in your data model is the various states that your financial entities (such as orders or trades) can go through - for example, new, amended, completed or cancelled.
Integration testing