# Bi-temporality

In Axway Decision Insight (DI), you have the ability to:

• Replay events as they happened in real-time.
• Replay events according to the time at which these events became known by DI.

This is all possible thanks to DI's bi-temporal database. On the one hand, you can replay events in the order in which DI first had knowledge about them or you can replay events as they happened in real-time.

Thus, for each events that arrives in DI, the following information is stored:

• The event key – this enables DI to identify and track the event.
• The Valid Time (VT) – the time at which an event actually happened. This can also be referred to as event time or real time.
• The Transaction Time (TT) – the time at which DI becomes aware that a specific event occurred. This can also be referred to as recorded time.

## Example

To better understand how bi-temporality works, let's look at how DI  processes the lifetime an event, for example, a transaction, and what type of time information is stored.

### Evolution of example transaction in real life

Let's say that:

1. In real-life, you have a transaction that occurs on April 3rd at 8.12 PM. DI knows about this transaction on April 4, at 8.00 AM.
2. In real-life, the transaction is assigned and starts being processed at 10.05 AM. DI knows about this at 10.10 AM.
3. The transaction is completed on April 5. at 12.36 PM. DI knows about the completion on April 5, at 2.10PM.

The following table describes how DI's knowledge of the event evolves as throughout the day.

Time range What DI knows
Before April 4, 8 PM DI is not aware of any event.
Between April 4, 8 AM and April 4, 10.10 AM

DI knows that an event was created the previous night.

Between April 4, 10.10 AM and April 5, 2.01 PM

At 10.10 AM, DI knows that the event was assigned 5 minutes earlier.

After April 5, 2.01 PM

After 2.01PM, DI knows the event is closed and can display the entire event evolution though time as it happened in real life.