Bỏ qua

Element <operate>

Warning

The current page still doesn't have a translation for this language.

But you can help translating it: Contributing.

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
<operate source="operate/customer_cleanup.opctl.csv"/>

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>)

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
id|template|op1
customer-cleanup|templates/customer.template.xml|set(//customer/status,de-identified)
operate-dataset/templates/customer.template.xml
1
2
3
4
<customer>
    <id>C-100</id>
    <status>pending</status>
</customer>
operate-dataset/datamimic.xml
1
2
3
4
5
6
7
<setup defaultSeparator="|">
    <operate source="data/customer-cleanup.opctl.csv"
             operation_prefix="op"
             template_not_found_action="error"
             operation_not_matched_action="error"
             export_strategy="local"/>
</setup>

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.

Full rule

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.

Full rule

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.

Full rule

I359 — Operate MinIO Client Count

accepts at most one configured MinIO client; found {count}.

Why: Several MinIO clients are declared, so the operate artifact destination is ambiguous.

Resolution: Keep one MinIO client for the descriptor, remove all to use the standard object storage, or use local artifact export.

Full rule

I360 — Operate MinIO Client Required

Configured MinIO client '{storage_id}' did not resolve to MinioClient.

Why: The descriptor-selected operate artifact client is not a MinIO client.

Resolution: Correct the selected client configuration so it resolves to a MinIO client.

Full rule

I315 — Export Storage Bucket Missing

Missing default bucket for storage client '{storage_id}'. Configure 'bucket' (MinIO/AWS) or 'container' (Azure) in the block, or pass an explicit bucket on the exporter.

Why: A required default bucket for storage client '{storage_id}'. Configure 'bucket' (MinIO/AWS) or'container'(Azure) in the block, or pass an explicit bucket on the exporter.

Resolution: Provide the required bucket/container and retry.

Full rule

Allowed parents / Allowed children

Allowed parents: comment, else, else-if, if, setup, while

Allowed children:

comment

Attributes

Show all 6 attributes

export_strategy

Artifact destination: minio (default) writes to the declared MinIO client or the standard object storage under the task id; local writes beside the descriptor.

optional; string; Default: "minio"; 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.