# Viewing Context

# State diagram

The central piece of viewing is a workflow and state transition. The best way to understand the viewing design is to understand all the states that we have within a viewing and how they transition from one to another.

# Class diagram

# Sequence: Viewing reminder

We need to be able to send a viewing reminder, one day before the viewing happens. We can utilise the AWS Step Function Wait State's TimeStamp feature:

"wait_until" : {
  "Type": "Wait",
  "Timestamp": "2016-03-14T01:59:00Z",
  "Next": "NextState"
}

In a case of rescheduling, we need to be able to stop an execution from Reminder State Machine, so:

  1. Use Viewing ID when creating a new execution under Reminder State Machine
  2. Call stopExecution with executionArn, which will contain the Viewing ID