Skip to content

Instantly share code, notes, and snippets.

@Sporky023
Created September 9, 2012 23:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sporky023/3687955 to your computer and use it in GitHub Desktop.
Save Sporky023/3687955 to your computer and use it in GitHub Desktop.
openbay state transitions
Non-indented lines show actions take by users.
Indented lines show resulting states of various records.
Everything is from SP's point of view:
[P, C, or S] (P)ending, (C)losed, (S)ettled. Which list to show Offer on under "Manage Offers"
[A, C] (A)ctive, (C)losed. Which list to show Service Request on.
SCENARIO 1: VO withdraws offer
VO: create service_request_1
service_request_1: 'Active, N days remaining' - A
SP-1: create offer_1a
service_request_1: 'Active, N days remaining' - A
offer_1A: 'Active' - P
SP-1: withdraw offer_1a
service_request_1: 'Active, N days remaining' - A
offer_1A: 'Withdrawn' - C
SP-1: create offer_1b
service_request_1: 'Active, N days remaining' - A
offer_1A: 'Withdrawn' - C
offer_1b: 'Active' - P
VO: withdraw service_request_1
service_request_1: 'Withdrawn' - C
offer_1a: 'Withdrawn' - C
offer_1b: 'Service request withdrawn' - C
SCENARIO 2: VO accepts offer and SP settles it
VO: create service_request_2
service_request_2: 'Active, N days remaining' - A
SP-3: create offer_3a
service_reqeust_2: 'Active, N days remaining' - A
offer_3a: 'Active' - P
SP-4: create offer_4a
service_request_2: 'Active, N days remaining' - A
offer_3a: 'Active' - P
offer_4a: 'Active' - P
VO: accept offer_3a
service_request_2
viewed by SP-3: "Awarded to SP-3" - A
viewed by SP-4: "Awarded to another business" - C
offer_3a: 'Award' - P
offer_4a: 'Lost' - C
SP-3: settle offer_3a
service_request_2
viewed by SP-3: "Settled at [settled_at datestamp]" - C
viweed by SP-4: "Awarded to another business" - C
offer_3a: 'Settled' - S
offer_4a: 'Lost' - C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment