Postponing the processing of events by using when has occurred

The clause when <event> has occurred <calendar duration> ago instructs the agent to postpone the processing of the event.

You use postponed processing if an event depends on other events, if the order in which the events are processed is important, or if an action must happen after a certain duration. You can also test the presence or absence of events.

In a rule that uses the clause when <event> has occurred <calendar duration> ago, the event that occurred is the reference event. The rule is not triggered upon the arrival of this event, but it is postponed by a fixed calendar duration. Each rule instance is applicable only once, when the condition that is expressed by the calendar duration is satisfied.

Note: As time elapses between the time stamp and the system time, data can change during this elapsed time. In other words, the state of the entities might not be the same when the event is sent compared to the time when the event is processed.
The following rule postpones the processing of a purchase event. now is after a fixed duration of one hour and 15 minutes after the purchase event.
when a purchase event has occurred 1 hour 15 minutes ago
if the loyalty card amount of 'the customer' is more than 200
then ...

The following rule checks if the pizza order that was made 30 minutes before now is not delivered. If the order is not delivered, the order is late.

when a pizza order has occurred 30 minutes ago
if
    the order status of 'the order' is not DELIVERED
then
    make it true that 'the order' is late;