Element <template>¶
Purpose: Reusable AMA EDI template definition.
Why: Use it to name one project-owned EDI template before outputs select it.
Example¶
1 | |
Decision guide¶
Business value: Separates reusable message structure from output-specific filenames and variables.
-
Use when
- One or more outputs render a stable project template.
-
Choose another approach when
- The descriptor has no AMA output to render.
-
Prerequisites
- Keep the template path in the project and reference an existing profile when needed.
-
Alternatives
- Use output to instantiate a declared template as a message. (See:
<output>)
- Use output to instantiate a declared template as a message. (See:
Complete examples¶
Render profiled EDIFACT output and package its artifacts
Use the AMA family when partner-specific EDIFACT separators, templates, output names, side artifacts, and archive packaging must be modeled together.
| ama-edifact-package/templates/order.template.edi | |
|---|---|
1 | |
| ama-edifact-package/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | |
Rules and invalid combinations¶
No additional element-specific rules. Required attributes, types, and supported values are shown below.
Allowed parents / Allowed children¶
Allowed parents: ama-generate, else, else-if, if, templates, while
Allowed children:
None
Attributes¶
Show all 4 attributes
edifactProfileRef
Identifier of the EDIFACT separator profile used for this template.
optional; string; Default: null.
id
Unique identifier for this AMA template.
required; string.
path
Project-relative path to the AMA EDI template file.
required; string.
sourceScripted
Whether template source values are evaluated as scripts.
optional; boolean; Default: null.