Assembly Editor
Building Assemblies

Subassemblies

6min

A subassembly is a re-usable assembly diagram that has defined input and output.

Subassemblies can be dragged from the catalog as nestable blocks and placed within other assembly diagrams.

Subassemblies promote the re-use of functionality and reduce the complexity of wiring diagrams:

Document image


Subassemblies appear with a blue window in the editor, to help them stand out from individual modules.

Subassemblies can also contain other nested subassemblies.

Creating Subassemblies

All subassemblies must contain a Subassembly Input module and a Subassembly Output module, which define the entry point and input data into the subassembly, and the output data from the subassembly:

Document image


When an outer assembly invokes the subassembly, any data streams wired into the subassembly are emitted from the Subassembly Input module.

The Subassembly Input module can be configured with test data in the form of one or more XML Data Streams, or a text or number value.

The test data is only emitted when the subassembly is executed within the editor.

The Subassembly Output module emits whatever is wired into it, which can be one or more data streams, or a text or number value.

Subassemblies are created when an assembly having both a Subassembly Input module and a Subassembly Output module is saved into the Subassemblies category:

Document image




Dropdown Parameter Subassemblies

The Dropdown Parameter (Populated) module is used when configuring triggers or actions. A dropdown list is populated with the contents emitted by a nested subassembly:

Document image


The nested subassembly can perform any needed logic, such as fetching data from an API.

The subassembly must use a specialized version of the Subassembly Output module, called Subassembly Output (Dropdown Parameter):

Document image


This specialized module allows the labels that appear within the dropdown to be specified, along with values for each label item.

Subassembly Input Parameters

Subassemblies can be parameterized. Subassembly parameters make it possible to customize your subassembly's behavior based on configured values.

The Parameter modules contained in the module catalog under the Input – Parameters category are used to define subassembly parameters:

Document image


In the example below, the Flickr URL subassembly has a parameter "tags" defined:

Document image


The "tags" parameter is wired to the Flickr URL such that Flickr will return photos matching the search criteria contained within the "tags" parameter value.

When the Flickr URL subassembly is used, the "tags" parameter becomes exposed in the subassembly window as a configurable field value:

Document image


Now, the "tags" parameter can be configured without having to edit the Flickr URL subassembly.

Various types of Parameter modules are available, including checkboxes, sliders, and more. Each parameter value will appear using the UI control specified by the type of Parameter module used.

If one or more parameters are defined and the subassembly is referenced by another assembly, then those existing parameters cannot be removed or altered in order to preserve referential integrity.