Any UI Toolkit control can fire a boundary event of the coach - it is what the Button control does - so "enhancing" a control means calling the coach's event mechanism from the control's own event handler:
// UI Toolkit: any control's event (e.g. Single Select "Country" > On change) can trigger the boundary event of a hidden Button
${GoButton}.click(); // the Button "GoButton" has its boundary event wired in the CSHS diagram; hide it (visibility NONE)
// or directly from the control's context (works for every coach view):
me.context.trigger(function () { /* callback after the event was handled */ }); // fires the boundary event attached to THIS control in the diagramIn the CSHS diagram, every coach view placed on the coach - not only buttons - can have a boundary event wire (drag from the control's edge); it fires when the control calls context.trigger(). For OOB controls that do not call it themselves (a Single Select, a Table's row selection, a Date Picker), the two lines above do it from their events. Add Stay on page to the wire when the flow should call a service and return to the same coach (typical for "on change > recalculate on the server").
Custom coach view that should behave like a button: wrap the OOB control in your view and expose an Event option or call this.context.trigger() in the load handler's listener (question 2503). Validation before firing: the boundary event honours the coach's validation when the wire's validate option is set in the diagram; to skip validation for a "Cancel" path, untick it on the wire.
References