Version

    Chapter 44. Using Subgraphs

    Using Subgraphs

    You need to place and configure a Subgraph component in order to use a subgraph as a component in a regular graph. There are three ways to do this:

    • Drag and drop a subgraph *.sgrf file from the Navigator view into the Graph editor. This will automatically create a Subgraph component and configure it to use the selected subgraph.

    • Insert subgraph using the Add Component dialog (activated via Shift+Space shortcut). Subgraphs can be selected as ordinary components, you can search for available subgraphs by entering the keyword “subgraph” into the search filter. The dialog displays subgraphs from a project where your graph resides.

    • Drag and drop the Subgraph component from the PaletteJob Control section to the graph editor and configure the Subgraph URL attribute to point to subgraph definition.

    Subgraph Component

    Figure 44.1. Subgraph Component


    Configuring Subgraphs

    Subgraph is configured in the same way as any other component - using attributes.

    Graph parameters and dictionary passed into the graph can be changed or set up in the Input mapping attribute of the Subgraph Component.

    Example of User-defined Component

    Figure 44.2. Example of User-defined Component


    The subgraph on figure above has two user-defined attributes: Sort key and Filter Expression.

    User Defined Component Attributes - Public Parameters

    The Subgraph component does not have a fixed number of attributes. The subgraph can expose any attribute of a component being used in the subgraph using public parameters, the values are set up as attributes of the Subgraph component. This way you can, for example, set up filter expression used in a subgraph using the attribute of the Subgraph component.

    Meaning and type of user-defined attributes depend on particular subgraph.