Last active
September 7, 2020 14:07
-
-
Save saadshahd/b7566849d96676ac76bca2bd758e8f51 to your computer and use it in GitHub Desktop.
Revisions
-
saadshahd revised this gist
Sep 7, 2020 . 1 changed file with 89 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -103,40 +103,115 @@ const statusMachine = Machine({ }, qa: { // type: 'parallel', initial: "Unreviewed", states: { Unreviewed: { on: { FACTS_REVIEW: "FactsReviewed" } }, FactsReviewed: { on: { PASSIVE_REVIEW: "Passive", ACTIVE_REVIEW: "Active" } }, Passive: { type: "parallel", states: { RawData: { initial: "NotStarted", states: { NotStarted: { on: { PASSIVE_REVIEW_RAWDATA_START: "Started" } }, Started: { on: { PASSIVE_REVIEW_RAWDATA_CHANGE: "Changed", PASSIVE_REVIEW_RAWDATA_COMPLETE: "Completed" } }, Changed: { type: "final" }, Completed: { type: "final" } } }, Location: { initial: "NotStarted", states: { NotStarted: { on: { PASSIVE_REVIEW_LOCATION_START: "Started" } }, Started: { on: { PASSIVE_REVIEW_LOCATION_CHANGE: "Changed", PASSIVE_REVIEW_LOCATION_COMPLETE: "Completed" } }, Changed: { type: "final" }, Completed: { type: "final" } } }, FreezeFrame: { initial: "NotStarted", states: { NotStarted: { on: { PASSIVE_REVIEW_FREEZEFRAME_START: "Started" } }, Started: { on: { PASSIVE_REVIEW_FREEZEFRAME_CHANGE: "Changed", PASSIVE_REVIEW_FREEZEFRAME_COMPLETE: "Completed" } }, Changed: { type: "final" }, Completed: { type: "final" } } } }, on: { ACTIVE_REVIEW: "Active" } }, Active: { type: "parallel", states: { RawData: { initial: "NotStarted", states: { NotStarted: { on: { ACTIVE_REVIEW_RAWDATA_START: "Started" } }, Started: { on: { ACTIVE_REVIEW_RAWDATA_CHANGE: "Changed", ACTIVE_REVIEW_RAWDATA_COMPLETE: "Completed" } }, Changed: { type: "final" }, Completed: { type: "final" } } } @@ -159,7 +234,10 @@ const statusMachine = Machine({ } }, Complete: { type: "final", on: { UPDATE: "InProgress" } }, Failed: { on: { -
saadshahd created this gist
Sep 7, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,172 @@ const statusMachine = Machine({ id: "status", type: "parallel", states: { info: { initial: "Created", states: { Created: { on: { OFFICIALLY_SCHEDULED: "OfficiallyScheduled" } }, OfficiallyScheduled: { entry: ["scheduleVideo", "scheduleLineups"], on: { READY_FOR_COLLECTION: "ReadyForCollection" } }, ReadyForCollection: { on: { READY_FOR_IQ: "ReadyForIQ" } }, ReadyForIQ: { type: "final" } } }, ops: { initial: "Unassigned", states: { Unassigned: { on: { ASSIGN: "Assigned" } }, Assigned: { on: { UNASSIGN: "Unassigned" } } } }, video: { initial: "Unavailable", states: { Unavailable: { on: { FOUND: "Available" } }, Available: { type: "final" } } }, collection: { initial: "NotStarted", states: { NotStarted: { on: { START: "Started" } }, Started: { on: { COMPLETE_TAG: "PendingValidation" } }, PendingValidation: { on: { VALIDATE: "Complete", INVALIDATE: "Invalid", NO_FF: "WithoutFF", NO_LOCATION: "WithoutLocation", NO_DIRECTION: "WithoutDirection" } }, WithoutLocation: { on: { LOCATION_ADDED: "PendingValidation" } }, WithoutFF: { on: { FF_ADDED: "PendingValidation" } }, WithoutDirection: { on: { DIRECTION_ADDED: "PendingValidation" } }, Invalid: { on: { VALIDATE: "PendingValidation" } }, Complete: { type: "final" } } }, qa: { // type: 'parallel', initial: 'Unreviewed', states: { Unreviewed: { on: { FACTS_REVIEW: 'FactsReviewed' } }, FactsReviewed: { on: { PASSIVE_REVIEW: 'Passive' } }, Passive: { type: 'parallel', states: { RawData: { initial: 'NotStarted', states: { NotStarted: { on: { PASSIVE_REVIEW_RAWDATA: 'Started' } }, Started: { on: { CHANGE: 'Changed', COMPLETE: 'Completed' } }, Changed: { type: 'final' }, Completed: { type: 'final' } } } } } } }, importer: { initial: "NotStarted", states: { NotStarted: { on: { START: "InProgress" } }, InProgress: { on: { SUCCESS: "Complete", FAIL: "Failed" } }, Complete: { type: "final" }, Failed: { on: { RETRY: "InProgress" } } } } } });