Affects Version/s: None
Fix Version/s: None
The snapshotter will snapshot a group of predefined QSS settings at startup (this can be just listed in a JSON file in gpii-universal for now). These setting values will be sent via PSP channel to provide initial setting values to QSS supported settings.
Thoughts on the implementation:
1. First, rewrite SessionToPSP so that it makes more use of
i) The existing (and new) snapshotter output as recorded in appliedSolutions by code like this
ii) Some further information are written into the LifecycleManager's session so that we can distinguish settings resulting from snapshots from those from preferences
2. Then we just need to also eliminate SessionToPSP's reading of the matchmaker output at https://github.com/GPII/universal/blob/master/gpii/node_modules/flowManager/src/PSPChannel.js#L202 from "activeConfiguration.inferredConfiguration.applications" -
we should also just read that from appliedSolutions/originalSettings as well
3. We will also write some provenance info so that this can then be written into settingsControls by sessionToPSP
4. In order to operate the snapshotting, we need to be told what settingsHandlers to execute. So it sounds like we will indeed need to do a round of (private) matchmaking - based on a fake preference set which has one entry for every preference/setting that the QSS expects to read/write. After we have got this matchMaker payload, we can inspect it to find how to compute the corresponding snapshot - which we will do via the GET methods rather than the SET methods that the current gpii.lifecycleManager.recordSnapshotInSession relies on.
The discussion for the snapshotter and a few other things can be found in this pad.