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:
Where the coloniser record reference has the following properties:
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:
results in:
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:
and then include that rule in the properties for the control group:
results in: