---
title: "Reusable Subflows"
slug: "reusable-subflows"
description: "In this Test Modeller 101 Tutorial on creating reusable processes, you’ll see the benefit is in reducing manual effort and enabling scalability, through connecting existing models."
tags: ["Test Modeller 101", "Learning Portal", "Test Modeller"]
updated: 2024-09-27T14:45:22Z
published: 2024-09-27T14:45:22Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://knowledge.curiositysoftware.ie/llms.txt
> Use this file to discover all available pages before exploring further.

# Reusable Subflows

## 6.1 Creating Reusable Subflows

In this Quality Modeller 101 Tutorial on creating reusable processes, you’ll see the benefit is in reducing manual effort and enabling scalability, through connecting existing models and seeing them as components for use in a variety of Scenarios. A typical example might be a log-in process, and this reuse extends to Test Data.

In the example, the prerequisite is to have at least 2 models created. These Subprocesses are imported through Quality Modeller’s Explorer window into an end-to-end flow.

You’ll see the use of End Nodes too, that on each import of a subprocess to an end-to-end Quality Modeller prompts which node from the previous Subprocess to chain to. There are 2 flows through the model, one leading to a happy validated end point but also a variant of an error, which are both viable outcomes that require testing.

[Embedded content](https://www.youtube.com/embed/R5e8vRRXHbI?&amp;wmode=opaque&amp;rel=0)

---

## 6.2 Parameterising Subprocess Data

In this Quality Modeller 101 Tutorial on parameterising subprocess data, you’ll see how Subflows can pass or take Variables to one another or overwrite them, depending on how these have been Exposed and Mapped.

The example here is of a Username and Password, the first Subflow shows the process for creating a Username and Password, and the second model is for using this created Username and Password as login credentials.

So, you’ll see how Variables can be sent and modified from one subprocess to another. In terms of previewing which nodes you may want to pass down Variables, it’s possible to expand and collapse the view a subprocess within the Master Model.

Using the Data Variable pane you’ll see options to Expose predefined Variables, and using these as Mapped Outputs these Parameters go from one Subprocess to the next.

[Embedded content](https://www.youtube.com/embed/SeIDKp9ysO8?&amp;wmode=opaque&amp;rel=0)

---

## 6.3 Tagging Subprocesses for Test Case Generation

In this Quality Modeller 101 Tutorial, you'll be defining test coverage of the Model as both exhaustive but also low coverage to limit or expand the number of useful test cases generated, which involves laying Tags over specific Subflows.

You’ll see use of Coverage Profiles and how switching between each show different test case outcomes. The benefit of this, is that you can test a system component vigorously while in-sprint, and switch to a low Coverage Profile once tested.

For each level of testing coverage required, you’ll be able to attribute Tags to control how vigorously each component is tested. In the example, 26 paths or test cases get generated at the highest-level defined Coverage Profile, whilst this is reduced to 16 paths or test cases when switching to the low coverage profile.

[Embedded content](https://www.youtube.com/embed/jiLs1f_kvy4?&amp;wmode=opaque&amp;rel=0)

The Explorer section of Quality Modeller is the main location for finding all your models, data sheets, scans and variables. This will be the main view you use in Modeller and where you create new models and edit existing ones.

The End Node is the event that terminates the model. To use one, drag it from the Actions panel onto the Model canvas. There can be more than one End Node, each controlling for a unique outcome.The journey through the Flow ends at an End Node. Where a Model is used as a Subflow within another Model, the End Nodes become the outward connection to the master Model.

Subflows are used to quickly embed and re-use models within a master model. Subflows hide detailed or complex modelling and make the master Flow more readable. They enable scalability by building out the complexity from smaller, more step-focussed Models, rather than building giant, complex, inflexible Flows.

Test Data Variables are sets of data that can be attached to blocks in models. This data can be custom, synthetic, automated etc. Variables are basically assigned data values and rules to blocks, and this data is used when automation is run.

The Master Model is simply a model which combines Subflows into one large Model. Master Models are used to join together a range of system models, visualise them and test them as a whole.

A Model is a canvas and the Flow that is built onto it. There are several types of Model, some of which display different tabs and tools on the toolbar in Quality Modeller.

Tags are used in Models and are attached to blocks. They can be used for a range of reasons, but are most frequently used to define paths for test generation. For example, you can use Tags to define which blocks in your model are positive paths, and which are negative. Then you can use these Tags to customise the Coverage Profile for test generation for your model. Tags can be used to create a range of different Coverage Profiles and there is no limit to how many Tags a model can have.

## Related

- [Quality Modeller 101](/test-modeller-101.md)
- [Introduction](/introduction.md)
- [Building Models](/building-models.md)
- [Test Data Specification](/test-data-specification.md)
- [Test Generation](/test-generation.md)
- [Test Automation](/test-automation.md)
