-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathStateTransition.txt
63 lines (50 loc) · 4.43 KB
/
StateTransition.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
********************************************************************************
* State Transition
********************************************************************************
This document highlights how actions, logic, and reducers interact
together to maintain this feature's state (a text document is used to
accommodate the wide free-format content).
TODO: Verify this (may have changed in feature migration)
Actions (see: actions.js) Logic (see: logic.js) Reducer (see: state.js)
============================================== =================================================== ===============================
discovery
.filterForm
> iForm logic (auto-generated) > iForm logic (auto-generated) > iForm logic (auto-generated)
.open([domain] [,formMsg])
.fieldChanged(fieldName, value)
.fieldTouched(fieldName)
.process(values, domain) .......................................................................
processFilter:
=============
DISPATCH discovery.retrieve(action.domain ... i.e. filter)
DISPATCH view.change('discovery')
DISPATCH discovery.filterForm.close()
.reject(msgs)
.close()
.retrieve([filter]) ............................................................................... - set appState.discovery.inProgress = 'retrieve'
retrieve:
========
- discoveryService.searchDiscoveries(action.filter)
work: DISPATCH .complete(resp [with pagetoken/discoveries]
fail: DISPATCH .fail(err)
.complete(discoveriesResp [with pagetoken/discoveries]) ......................................... - retain appState.discovery.discoveries (from action.discoveriesResp)
- retain appState.discovery.filter (from action.filter)
- retain nextPageToken
- set appState.discovery.inProgress = null
.fail(err) ..................................................................................... - set appState.discovery.inProgress = null
NOTE: auto reported to user via logic:
diag.communicateUnexpectedErrors << WHA: doesn't exist
MONITORING ALL .fail actions
.nextPage(pagetoken) ............................................................................. - set appState.discovery.inProgress = 'next'
nextPage:
========
- discoveryService.searchDiscoveriesNextPage(action.filter)
work: DISPATCH .complete(resp [with pagetoken/discoveries]
fail: DISPATCH .fail(err)
.complete(discoveriesResp [with pagetoken/discoveries]) ........................................ - append appState.discovery.discoveries (from action.discoveriesResp)
- retain nextPageToken
- set appState.discovery.inProgress = null
.fail(err) ..................................................................................... - set appState.discovery.inProgress = null
NOTE: auto reported to user via logic:
diag.communicateUnexpectedErrors << WHA: doesn't exist
MONITORING ALL .fail actions