# S03041 {#s03041}

## Error Code {#error_code .section}

S03041

## Error Message {#error_message .section}

`This function can only be called in the monitor within a CEP engine. RefId: S03041`

## Probable Causes {#probable_causes .section}

This error occurs when the following functions are called outside the CEP monitor: `addEventListener`, `sendEvent`, `routeEvent`, `emitEvent`, `stopSubEngine`, `spawnMonitor`, and `destroyMonitor`.

## Solutions {#solutions .section}

Make sure the functions above are only called within the CEP monitor.

**Parent topic:**[Error Code Reference](../../Troubleshooting/ErrorCode.md)

