Build a flow

A Flow is the blueprint of a complex calculation where the outputs of one Model become the inputs to the next. We call them ‘virtual deployments’, because they are built using Model Schemas not the model code.

Model selection

The first step is to filter down to a list of candidate models.

Look for models to load

Pick the ones which you want to include in the flow and click ‘Load models’.

Look for models to load

On the next page you will see the selected models listed, plus the data inputs and outputs, which have been inferred from the schemas of the selected models.

If you want to change the model selection, add more using ‘Select models’ or delete from the list.

Look for models to load

Down the page is a first draft of the Flow which TRAC has built for you. The graph is drawn with an internal link where an output of one Model has the same Key as an input for another. Any inputs that cannot be sourced via an internal link are treated as inputs (orange).

If you selected models with common Keys, you should see a diagram like this…

Look for models to load

If you selected models with no common Keys, it might look more like this…

Look for models to load

Both these are technically correct and can be executed because a flow can contain unconnected models. The first pattern is more commonly what people are aiming for.

Intermediates

The ‘Save’ toggle on the list of Output data allows you to change a node in the Flow between Intermediate (grey) and Output data (blue).

Look for models to load

Intermediate data sets are not published as part of the results when the flow is run.

Labels and categories

Label is a reader-friendly version of the Key which is displayed in the UI when using a Flow.

Categories are used to group Models and Data on the pages from which you launch a Job. They can be left blank and are only useful if a Flow has a very large number of Models or Data inputs which can be meaningfully categorised into groups, to improve the user experience when launching a job.

Re-wiring

You can edit the default wiring using the Advanced options drop-down.

The rewiring tool allows you to replace Input data (orange) with an internal link, by manually mapping the Key of one Model’s output onto the Key of another Model’s input. Manual rewiring works if the data sets have been assigned different Key values but their schema’s are consistent.

Look for models to load

The dustbin allows you to remove a rewired link and return to the default configuration.

Saving the flow

Once you are happy with the Flow, provide the general attributes and click ‘Upload’. If the upload is successful you can find the flow via (Search Page) and use it to (Run a flow).

Look for models to load

The two most common reasons for being unable to save a new flow are missing name and description fields and schema inconsistency along one of the internal links. A warning message should inform you of these issues.

Look for models to load