A Subgraph is a Script Graph nested inside of another Script Graph. A Subgraph appears as a single node inside the parent Script Graph.
You can add a Subgraph to a Script Graph in two ways: create an entirely new Script Graph, or add an existing Script Graph file.
To add a new blank Subgraph to an existing Script Graph:
[!includewith-graph-open-ff]. Go to Nesting and select Subgraph.
In the Graph Inspector, choose the Source for your Subgraph:
[!includegraph-inspector-tip.md]
To add an existing graph file as a Subgraph in a Script Graph:
[!NOTE] You can’t nest a Script Graph as a Subgraph in its own graph file.
[!includewith-graph-open-ff]. Go to Nesting and select Subgraph.
In the Graph Inspector, set your Source to Graph.
[!includegraph-inspector-tip.md]
[!TIP] For a faster way to add a Script Graph as a Subgraph, click and drag the Script Graph from your Project window into the Graph Editor to automatically create a Subgraph node.
To open your new Subgraph for editing, select Edit Graph.
Once you’ve added a Subgraph to your Script Graph, define its Input and Output Triggers and Input and Output Data. For more information, see Add a Trigger or Data port to a Script Graph.