Card lifecycle model
When working with Atomic triggers and cards it is useful to consider the Atomic Card Lifecycle Model. The lifecycle model describes the various states that a card can be in, and how the card can move between states from the time it is first created, until the time it is closed.
The lifecycle model consists of states, transitions, and triggers. A card can only be in one state at a time and can transition between states when certain trigger conditions are met.
States
States break down into two categories - Open and Closed. As illustrated, cards can only transition in one direction: from open to closed. There are no subsequent transitions available once a closed state is reached. Cards can never move from a closed state to a different closed state, or back to an open state.
Open States
There are three open states, Active, Embargoed and Snoozed.
1. Active
When a card is active, it is available for viewing and actioning by the end user.
Transitions | Trigger |
---|---|
Snooze: Active → Snoozed | User Driven trigger occurs when end user snoozes card. |
Unsnooze: Snoozed → Active | Scheduled system trigger occurs when a card snooze expires. |
Publish: Embargoed → Active | Scheduled system trigger occurs when embargo expires. |
Dismiss: Active → Dismissed | User Driven trigger occurs when user dismisses card |
Action: Active → Completed | User Driven trigger occurs when user actions card |
Cancel: Active → Cancelled | API Driven trigger occurs when a cancel instruction is received |
Expire: Active → Expired | Scheduled system triggers occurs when card expiry time is reached. |
2. Embargoed
An embargoed card is not available to the end user; it does not show in any streams. Once the embargo period expires the card will transition to an active state and appear in streams.
Transitions | Trigger |
---|---|
Publish: Embargoed → Active | Scheduled system trigger occurs when embargo expires |
3. Snoozed
A snoozed card is not available to the end user; it does not show in any streams. Once the snooze period expires the card will transition to an active state.
Transitions | Trigger |
---|---|
Snooze: Active → Snoozed | User Driven trigger occurs when end user snoozes card. |
Unsnooze: Snoozed → Active | Scheduled system trigger occurs when a card snooze expires. |
Closed States
There are four closed states. Completed, Cancelled, Expired and Dismissed.
1. Completed
When a user actions a card, the card enters the completed state and is classified as closed. A card can also become completed by using the Cards API.
Transitions | Trigger |
---|---|
Action: Active → Completed | User Driven trigger occurs when end user actions card. |
Action: Any Open State → Completed | API Driven trigger occurs when a remote action instruction is received. |
2. Cancelled
When an API cancellation instruction is received the card is moved to the cancelled state and is classified as closed.
Transitions | Trigger |
---|---|
Cancel: Any Open State → Cancelled | API Driven trigger occurs when a cancel instruction is received. User driven trigger when the Cancel cards tool is used to cancel card(s). |
3. Expired
Cards move to an expired state when the expiry date and time is reached. They are then classified as closed
Transitions | Trigger |
---|---|
Cancel: Any Open State → Expired | Scheduled system triggers occurs when card expiry time is reached. |
4. Dismissed
When a user dismisses a card, the card enters the dismissed state and is classified as closed.
Transitions | Trigger |
---|---|
Dismiss: Active → Dismissed | User Driven trigger occurs when end user dismisses card. |