This section describes the steps that can only be used within a composite plan. The attributes of some of the steps that are contained within a composite plan can include references to plan variables and parameters.
The <execSubplan> step executes another plan. The <execSubplan> step can only appear as the child of the <compositeSteps> element.
The <execSubplan> step has an optional child element, <argList>, which is a list of arguments to pass to the called plan. For each parameter in the <paramList> section of the called plan for which no default value is declared, a corresponding argument must be declared by this <argList>. See <argList> Element. If specified, this element can only appear one time.
The <execSubplan> step has the following attributes:
planName – A required attribute of type entityName, which is the name of the plan to execute. When this step is run, a corresponding top-level <executionPlan> with this name must be specified. This name cannot reference an inline subplan.
planPath – An optional attribute of type pathReference, which is the path of the plan to execute. If this attribute is omitted, the path of the containing plan is assumed.
planVersion – An optional attribute of type Version, which is the version of the plan to execute. If this attribute is omitted, the latest version of the named plan is executed.
The <inlineSubplan> step executes a sequential series of steps. This step can only appear as the child of the <compositeSteps> element.
An <inlineSubplan> step is similar to an <execSubplan> step. However, while the <execSubplan> steps names an external plan to execute, the <inlineSubplan> step directly contains the plan to execute as a child element.
The primary difference between an inline subplan and a top-level plan is that inline subplans are not saved as distinctly named entities. Thus, inline subplans cannot be externally referenced by <execSubplan> steps. Top-level plans are distinctly named entities and can be referenced from <execSubplan> steps.
Inline subplans are useful when the content is concise, directly tied to the context and logic of the calling plan, and does not otherwise make sense as a stand-alone plan. In these cases, having all steps in one self-contained unit can facilitate plan maintenance and readability.
Unlike top-level plans, inline subplans cannot declare parameters. They implicitly inherit the parameters and variables of all enclosing plans. They can declare additional variables that are local to the inline subplan, which can hide variables and parameters of the enclosing plans. A subplan variable hides the variable of an enclosing plan if both have the same name. In this case, only the value of the variable that is declared by the innermost subplan is available for use by its steps.
The <inlineSubplan> step consists of an optional <varList> followed by one additional child element, either <simpleSteps> or <compositeSteps> depending on the type of inline subplan: simple or composite.
The <inlineSubplan> step has the following child elements:
<varList> – An optional element that is a list of plan variables for use within the inline subplan. If specified, this element can only appear one time.
<simpleSteps> – An optional element that contains a list of simple steps. Only one <simpleSteps> or <compositeSteps> element can be present. If specified, this element can only appear one time.
<compositeSteps> – An optional element that contains a list of composite steps. Only one <compositeSteps> or <simpleSteps> element can be present. If specified, this element can only appear one time.
The <inlineSubplan> step has the following attributes:
planName – A required attribute of type entityName, which is a name used to identify the inline subplan. This name is used primarily for display purposes, and need not be distinct from names of other plans (inline or top-level).
description – An optional attribute that is a string description of the inline subplan. This attribute is useful for documentation purposes.