Declaring events
Related Topics ...
We can declare events for your application by adding one or more Event Declaration builder calls to your model. We can also create a model that contains all the event declaration builder calls used in an application or by a set of related models and import that model into the others. This approach saves you from adding event declarations to the target models.
To create a "repository" model for event declarations:
- Create an empty model.
- Add an Event Declaration builder call for each event you want to be able to process.
- Save the model.
- Import the "event declaration repository" into each model that you want to be able to fire or process one of the declared events.
Whether you decide to add event declaration builder calls directly to the models firing and handling those events or implement the repository approach, adding the Event Declaration builder calls themselves is the same:
- In the Builder Palette, select Event Declaration, displaying the builder call editor.
- Specify a name for the event.
- To send data as part of processing the event, set the argument names and types.