# Announcing Interceptions

The last piece of the puzzle is how to announce events. You will do so via the inherited super type method `announceInterception()` that all your handlers,plugins and even the interceptors themselves have or via the interceptor service `processState()` method. This method accepts an incoming data struct which will be broadcasted alongside your event:

```javascript
// Announce with no data
announceInterception( "onExit" );

// Announce with data
announceInterception( 'onLog', {
    time = now(),
    user = event.getValue( "user" ),
    dataset = prc.dataSet
} );

// Announce via interceptor service
controller.getInterceptorService().processState( "onRecordInsert", {} );
```

> **Hint** Announcing events can also get some asynchronous love, read the [Interceptor Asynchronicity](/v5.x-1/digging-deeper/interceptors/interceptor-asynchronicity.md) for some asynchronous love.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://coldbox.ortusbooks.com/v5.x-1/digging-deeper/interceptors/custom-events/announcing-interceptions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
