Element <operate>¶
Purpose: Apply reviewed operations to XML or JSON templates and emit artifacts.
Why: Use it to apply reviewed operation-control rows to XML or JSON templates and emit assembled artifacts; every non-empty control row must name a .xml or .json template.
Example¶
1 | |
Decision guide¶
Business value: Makes template mutations explicit, reviewable, and reproducible before downstream delivery.
-
Use when
- Producing one or more XML or JSON artifacts from reviewed template mutation rows.
-
Choose another approach when
- Writing database rows directly, generating a product stream, or performing an implicit cleanup.
-
Prerequisites
- Provide a control file whose every non-empty row has template and operation columns; template names end in .xml or .json, case-insensitively.
- Choose a supported artifact destination.
-
Alternatives
- Use generate to create or transform records without an operation-control workflow. (See:
<generate>)
- Use generate to create or transform records without an operation-control workflow. (See:
Complete examples¶
Assemble an XML artifact from a reviewed operation-control dataset
Use operate when reviewed control rows must apply explicit template mutations before an XML or JSON artifact is delivered.
| operate-dataset/data/customer-cleanup.opctl.csv | |
|---|---|
1 2 | |
| operate-dataset/templates/customer.template.xml | |
|---|---|
1 2 3 4 | |
| operate-dataset/datamimic.xml | |
|---|---|
1 2 3 4 5 6 7 | |
Rules and invalid combinations¶
W004 — Deprecated XML Attribute Ignored
<{element}> attribute '{attribute}' in descriptor '{descriptor}' is deprecated and ignored; execution continues. {migration}
Why: The descriptor uses a known legacy attribute that no longer controls execution.
Resolution: Follow the migration hint when updating the model. Removing the attribute is not required to run it.
I950 — Operate Control Template Missing
Operate control CSV '{csv_path}' has no non-blank template value in row(s): {rows}
Why: Each non-blank control row needs a template reference before operations can be applied.
Resolution: Set the 'template' column for every control row or remove the malformed row.
I951 — Operate Template Format Unsupported
Operate template '{template}' has unsupported suffix '{suffix}'; supported suffixes: {supported}
Why: The operate executor has format-specific XML and JSON implementations only.
Resolution: Use an .xml or .json template file.
Allowed parents / Allowed children¶
Allowed parents: else, else-if, if, setup, while
Allowed children:
None
Attributes¶
Show all 6 attributes
export_strategy
Artifact destination: local writes beside the descriptor; minio requires one configured MinIO client.
optional; string; Default: "local"; Values: local, minio.
operation_not_matched_action
Action when operation is not matched.
optional; string; Default: "warn"; Values: warn, ignore, error.
operation_prefix
Prefix for operation commands.
optional; string; Default: "op".
source
Source file for operation control; each non-empty row must name a .xml or .json template.
required; string.
template-dir
Deprecated: accepted with a warning and ignored. Template paths come from operation-control rows.
optional; string; Default: null.
template_not_found_action
Action when template is not found.
optional; string; Default: "warn"; Values: warn, ignore, error.