Understand Flow Sessions
Intelligent Advisor Flows was only made available to select customers, and will not be made Generally Available.
Each flow session keeps track of all the data values for a particular flow. It generates a model of the current state of the flow by applying the linearization algorithm to the authored flow definition with the data in the session. The linearization algorithm ensures consistent evaluation of every flow, independent of the order in which the data is collected. It ensures no value collected later in the flow can influence the state of an item earlier in the flow. Data set in the session is always retained, even if it does not currently influence flow evaluation. For example, data for a currently hidden screen or control is not discarded. For more information, see Understand Linear Flows.
The interface for an IAFlowSession contains a model of the flow consisting of all the pages, containers, controls and other flow objects in a tree structure presented in their current form. That is, all the text substitution has taken place, visibility has been evaluated, and so on. The model changes only when refreshModel is called. Setting data into the session is an idempotent operation and will not have any effect on the model until it is refreshed. During a refresh, object identity is generally preserved for all objects in the model. The exception is when an object is removed from a group and re-added in a subsequent refresh cycle.
A simple session model might look like:
There are two broad classes of objects that exist in the interview model: container items and controls. Container items include interview pages, data actions, and the different containers that hold pages or data actions. Controls objects are only found inside screens or control containers.
Container items and controls have a "kind" property that allow you to introspect exactly what a given object is. These are given in the table below, and explained in the topics in this section.
| Kind | Interface | Description |
|---|---|---|
| Container items | ||
| flowItemGroup | IAFlowItemGroup | Container for a group of flow items |
| recordListFlowItemGroup | IARecordListFlowItemGroup | Container for a repeated set of flow item groups. Used when repeating one or more pages and data actions for each record in a record list. |
| page | IAPage | Flow page. Contains rows (IARow) that contain controls. |
| customDataAction | IACustomDataAction | Data action that represents some form of data contract between the flow and the runtime. Maps data into and out of the session in a structured manner. |
| Controls | ||
| label | IALabelControl | Label control for providing text features such as headings and explanatory text |
| input | IAInputControl | Input control that collects a single field value |
| referenceList | IAReferenceListInputControl | Input control that collects a reference list field value |
| recordCollect | IARecordCollectControl | Input control that collects a record list. Contains controls for the items in the list. |
| group | IAGroupControl | Control container that contains rows of controls |
| recordList | IARecordListControl | Control container used for repeating group controls for each record in a record list. |
| validation | IAValidationControl | Validation control for defining a constraint |