Availability: Public Title: BuildGraph Script Elements Crumbs: Description:Learn about the elements of a BuildGraph. version: 4.13 parent:Programming/Development/BuildGraph type:Reference tags:Programming tags:BuildGraph [VAR:TopicCompact] [OBJECT:TopicCompact] [PARAM:image] ![%Programming/Development/BuildGraph/ScriptAnatomy/Elements%](elements_topic.png) [/PARAM] [PARAM:icon] ![](%ROOT%/reference_icon.png)(convert:false) [/PARAM] [PARAM:title] %Programming/Development/BuildGraph/ScriptAnatomy/Elements:title% [/PARAM] [PARAM:description] %Programming/Development/BuildGraph/ScriptAnatomy/Elements:description% [/PARAM] [PARAM:path] [RELATIVE:Programming/Development/BuildGraph/ScriptAnatomy/Elements] [/PARAM] [/OBJECT] [/VAR] [TOC(start:1 end:2)] [EXCERPT:BuildGraphScriptElements] BuildGraph scripts are written in XML. This document covers the types of data found within BuildGraph scripts, as well as their overall structure. ## Elements Elements describe the data that they contain, making them one of the basic building blocks of BuildGraph scripts. The following tables contain items that are provided as metadata, which are exported when running on the build system. Although they're not used directly by BuildGraph when executing tasks locally, they're tagged with `[META]`. ## Graph Structure A BuildGraph script is typically defined with the following elements: * `` * `` * `` * `` ### Node `` is the smallest unit of execution in BuildGraph, having a set of inputs and outputs. Each `` consists of a sequence of tasks that are executed in order. | Attribute | Type | Required? | Description | | ---------------- | ------------ | ------------ | ---------------- | | Name | Name | Required | Name of the node. | | Requires | Target List | Optional | List of nodes, aggregates, or tagged file sets produced by other nodes that this node requires to execute, separated by semicolons. | | Produces | Tag List | Optional | Tagged file sets that this node makes available to other nodes, separated by semicolons. | | After | Target List | Optional | List of nodes that this node should run after, if they are part of the current target (ignored if they are not). Separated by semicolons. | | NotifyOnWarnings | Boolean | Optional | If false, this node will not produce notifications on warnings. Only used by build systems. Defaults to `true`. `[META]` | | If | Condition | Optional | Condition to be evaluated. The element is ignored unless the condition evaluates to `true`. | ### Aggregate `` declares a named aggregate that can be used as a synonym for a set of other nodes (or produced tag sets). | Attribute | Type | Required? | Description | | | ---------------- | ------------ | ------------ | -------------- | | Name | Name | Required | Name of the aggregate. | | Requires | Target List | Required | List of dependencies for this aggregate. May be nodes, tagged file sets, or agent groups. | | If | Condition | Optional | Condition to be evaluated. The element is ignored unless the condition evaluates to `true`. | ### Agent `` defines requirements for an agent on nodes that will be executed in sequence (without cleaning intermediate directories). `` requirements are ignored when building locally, but must be specified. | Attribute | Type | Required? | Description | | ---------------- | --------------- | ------------ | ----------- | | Name | Name | Required | Name of the group. | | Type | Identifier List | Optional | Type of agent to run on. The meaning of this string is inferred by the host build system; it does not have any intrinsic meaning. `[META]` | | If | Condition | Optional | Condition to be evaluated. The element is ignored unless the condition evaluates to `true`. | ### Trigger `` serves as a container for portions of the graph that should only be executed with explicit user intervention. To execute nodes behind a trigger, pass `-Trigger=` to the command line. | Attribute | Type | Required? | Description | | ---------------- | --------------- | ------------ | ------------------ | | Name | Name | Required | Name of the trigger. | | If | Condition | Optional | Condition to be evaluated. The element is ignored unless the condition evaluates to `true`. | ## Property Manipulation BuildGraph properties can be modified with the following elements: * `` * `