> ## Documentation Index
> Fetch the complete documentation index at: https://platform.docs.zenoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Execution Events

> Execution events log is disabled by default to protect PII data and can be turned on by running the instance with profile enable-execution-log turned on.

# Execution events

Each workflow execution produces a detailed log of execution events. Execution events log is disabled by default to protect PII data
and can be turned on by running the instance with profile `enable-execution-log` turned on.
These include life-cycle events, execution requests, responses, errors, executed commands, results etc.

The execution events are stored in `execution_events` Kafka topic. They are **timestamped** and correlated by execution **UUID**.

When aggregated, execution events can be used for troubleshooting. They can be processed for real-time metrics and analytics purposes.

## Execution life-cycle

* Started Event
  produced when execution starts

* Expired Event
  produced when execution expires

* Terminated Event
  produced when execution terminates

## Execution requests

* Execute Request
  triggers a new execution

* Route Submit Request

* Route Back Request

* Exchange Submit Request

## Execution responses

* Route Response
* Validation Error Response
* Error Response

<img src="https://mintcdn.com/zenoo-eaa1410a/S2YF7Dg61X-fpeIV/images/executionResponses.png?fit=max&auto=format&n=S2YF7Dg61X-fpeIV&q=85&s=f2595737c1ebb5c9386f9219ece98aa6" alt="Execution responses" width="567" height="148" data-path="images/executionResponses.png" />

## Context events

Used as an event payload in *Execution Context Event*. Context events are produced by the DSL executors for a particular execution.
They provide a detailed log of a DSL script execution, like

* when a command is executed (CommandEvent)
  * route (RouteEvent)
  * exchange (ExchangeEvent)
  * go back (BackEvent)
* command result is provided
  * route result (RouteResultEvent)
  * exchange result (ExchangeResultEvent)
  * attribute set (AttributeSetterEvent)
* function execution
  * executed (FunctionEvent)
  * result is provided (FunctionResultEvent)
* errors
  * validation error (ValidationErrorEvent)
  * execution error (ErrorEvent)
* execution life-cycle
  * initialized (InitEvent)
  * terminated (TerminatedEvent)

<img src="https://mintcdn.com/zenoo-eaa1410a/S2YF7Dg61X-fpeIV/images/contextEvents.png?fit=max&auto=format&n=S2YF7Dg61X-fpeIV&q=85&s=0105ad902c2cae512931df758b5f6840" alt="Context events" width="1366" height="237" data-path="images/contextEvents.png" />

## Exchange events
