Element <include>¶
Purpose: Compose another descriptor or properties resource into the current setup scope.
Why: Use it to compose reusable descriptors or properties instead of copying configuration.
Example¶
1 | |
Decision guide¶
Business value: Keeps shared model fragments and environment-specific properties reusable without copying them.
-
Use when
- Several descriptors share a fragment or a properties file.
- The included URI or properties are selected dynamically.
-
Choose another approach when
- The content is untrusted or used only once and is clearer inline.
-
Prerequisites
- Keep the include path inside the descriptor workspace and declare referenced properties first.
-
Alternatives
- Keep a small one-off flow directly in the owning setup. (See:
<setup>)
- Keep a small one-off flow directly in the owning setup. (See:
Complete examples¶
Call one typed descriptor fragment with scoped parameters
Use a param contract and include-local properties when several business products share one model shape but require different bounded values.
| parameterized-fragment/fragments/payment.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
| parameterized-fragment/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 | |
Rules and invalid combinations¶
I201 β Include File Not Found
Include file '{uri}' not found in task workspace
Why: The referenced configuration could not be found for the include configuration.
Resolution: Ensure the referenced file exists and the identifier/path is correct.
I202 β Include Properties Parse Failed
Failed to parse include properties file '{uri}': {error}
Why: The system failed to parse include properties file '{uri}': {error}.
Resolution: Fix the input format and retry.
I203 β Include Unsupported File Type
Unsupported include file type '{uri}'. Only .properties and .xml are supported
Why: The configuration uses an unsupported include file type '{uri}'. Only .properties and .xml are supported.
Resolution: Use a supported file or adjust the configuration.
I204 β Include Unsupported File Type Generate
Unsupported include file type '{uri}' inside
Why: The configuration uses an unsupported include file type '{uri}' inside
Resolution: Use a supported file or adjust the configuration.
I205 β Include Condition Not Boolean
Condition '{condition}' for include '{uri}' evaluated to a non-boolean value (not a valid boolean value): {value}
Why: A condition evaluated to a non-boolean value in the include configuration.
Resolution: Ensure the expression evaluates to true or false.
I206 β Include Condition Eval Failed
Failed to evaluate condition '{condition}' for include '{uri}': {error}
Why: The system failed to evaluate condition '{condition}' for include '{uri}': {error}.
Resolution: Fix the expression or script and retry.
I207 β Include Path Outside Descriptor
Include path '{uri}' is outside descriptor directory '{descriptor_dir}' or violates relative-path policy: {reason}
Why: The include path is outside the descriptor directory or does not follow relative-path requirements.
Resolution: Use a relative include path under descriptor_dir.
I208 β Include Dynamic Properties With Overlay
Include '{uri}' resolved to a .properties file, but
Why: The include resolved to a .properties file even though the descriptor configured XML-only property overlays.
Resolution: Remove the
I616 β Parser Include Property Duplicate
Duplicate
Why: The include configuration defines the same scoped property name more than once.
Resolution: Remove or rename the duplicate
I617 β Parser Include Property On Properties
Element
Why: Scoped include properties are only supported when the include target is an XML descriptor.
Resolution: Remove the
I618 β Parser Include Param Missing
Fragment contract violation for
{contract_table}
{missing_summary}
Why: The included fragment declares required params that were not supplied by the caller.
Resolution: Supply the missing
I619 β Parser Include Param Invalid Value
Invalid value for param '{param_name}' in
Why: The include caller supplied a literal value that does not satisfy the fragment param contract.
Resolution: Update the
Allowed parents / Allowed children¶
Allowed parents: else, else-if, generate, if, iterate, setup, while
Allowed children:
property
Related concepts and use cases¶
- Dynamic Includes and Fragment Parameters β Explains URI interpolation, scoped include properties, typed fragment params, runtime caller context, nesting, conditions, and cataloged failures for reusable XML composition.
- First DATAMIMIC Model β Builds the smallest model and then composes preparation and generation stages.
Attributes¶
Show all 2 attributes
condition
Condition expression to evaluate whether to include this file.
optional; string; Default: null.
uri
URI of the file to include.
required; string.