- Add a flag to our model metadata to indicate that we want to handle events
- Include a new method that will receive
Setting up a model to handle events
To set up a model to handle events, we need to add a new flag to the model metadata calledeventAware
and set it to true
.
handle_event
that will be called by the model runtime when an event is triggered.