Handling deadlines
Thus far, we have looked at events that are caused by human (for example, the applicant submitting an LC application) or system (for example, the auto-approval of an LC application) action. However, in an event-driven system, not all events occur due to an explicit human or system stimulus. Events may need to be emitted either due to inactivity over a period of time or on a recurring schedule based on prevailing conditions.
For example, let’s examine the case where the bank needs submitted LC applications to be decided on as quickly as possible. When applications are not acted upon by the trade finance managers within 10 calendar days, the system should send them reminders.
To deal with such inactivity, we need a means by which to trigger system actions (read: emit events) based on the passage of time—in other words, perform actions when a deadline expires. In a happy path scenario, we expect either the user or the system to take a certain action...