Reference Global Input Data Records From the Global Input Scheme

Intelligent Advisor Flows was only made available to select customers, and will not be made Generally Available.

References can also be used from within the global input schema to create cross-references between objects when using the Flow Engine API.

For example:

Global input data defined in a flow scheme project in Intelligent Advisor Hub

Where the coloniser record reference has the following properties:

The property settings for the country object in a flow scheme in Intelligent Advisor Hub

The IAFlowSession.globalInputDataDefinition JSON scheme will look like:

{
    "type": "object",
    "additionalProperties": false,
    "properties": {
        "country": {
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "name": {
                        "type": "string"
                    },
                    "id": {
                        "type": "number"
                    },
                    "coloniser": {
                        "references": "/country",
                        "type": "number"
                    }
                },
                "required": [
                    "id",
                    "name"
                ]
            }
        }
    }
}

which could be loaded with:

session.setGlobalInputData({
        "country": [
            { "id": 1, "name": "Austria" },
            { "id": 2, "name": "Australia", "coloniser": 3 },
            { "id": 3, "name": "England" },
            { "id": 7, "name": "France" },
            { "id": 8, "name": "New Caledonia", "coloniser": 7 }
        ]
    });
await session.refreshModel();

with a sample flow of:

A page in a flow in Intelligent Advisor Hub showing country names in a label

results in:

A page in a flow application showing the country name and coloniser country

Also note that the objects defined in the global input schema can also have rules written against them.

For example, if we only want to show the colonised countries we could create a rule like:

A rule in a flow project used to determine if the country was colonised

and then include that rule in the properties for the control group:

A rule used to control the visibility of choices for an object in a control group in a flow project

results in:

A page in a flow application showing only countries that have been colonised