Element <ama-generate>¶
Purpose: Render configured AMA/EDIFACT messages and their associated artifacts and packages.
Why: Use it to assemble deterministic EDIFACT messages, sidecars, and package artifacts for one delivery.
Example¶
1 | |
Decision guide¶
Business value: Makes a partner delivery reproducible from declared templates, variables, outputs, and packaging.
-
Use when
- A data model must produce configured AMA/EDIFACT files and associated delivery artifacts.
-
Choose another approach when
- The requirement is ordinary record generation, a generic file export, or an unbounded stream.
-
Prerequisites
- Declare local templates, outputs, and any referenced EDIFACT profiles.
-
Alternatives
- Use generate for general record and artifact generation. (See:
<generate>)
- Use generate for general record and artifact generation. (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¶
I621 — Parser AMA Reference Invalid
AMA {reference_kind} '{reference}' is invalid: {reason}
Why: The AMA block contains a duplicate identifier or an unresolved local reference.
Resolution: Declare each profile and template once, then reference an existing identifier.
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, setup, while
Allowed children:
artifact, edifactProfiles, output, package, template, templates, variable
Attributes¶
Show all 7 attributes
defaultEdifactProfileRef
Default EDIFACT profile reference id.
optional; string; Default: null.
encoding
Encoding override for AMA outputs.
optional; string; Default: null.
name
Name of the AMA generate block.
optional; string; Default: "AmaGenerateModel".
outputDir
Output directory for generated EDI files (transitional).
optional; string; Default: null.
separator
CSV separator for AMA trace outputs.
optional; string; Default: null.
variablePrefix
Variable name prefix for AMA templates.
optional; string; Default: null.
variableSuffix
Variable name suffix for AMA templates.
optional; string; Default: null.