apply_operations
Runs a previewed batch of create, update, and delete operations across multiple model tables in dependency order, then applies them step by step.
Instructions
Create, update and delete records in several tables at once, e.g. the materials, sections, nodes, elements, load cases and loads of a small model. Two steps: preview, then apply.
Each operation is what write_records or delete_records would take: table, action ("create", "update" or "delete"), and records ({id: fields}) or ids. The steps are run in midas-nx's dependency order (deletes first, then what is named before what names it), whatever order they are given in; the preview shows that order. The preview checks the whole batch first, with the records earlier steps create counted as existing: the same rules as write_records and delete_records. A UNIT change is not taken here. At most 20 operations and 200 records in all.
Applying runs the steps one by one and reads each table back. It stops at the first step that fails, changes nothing, or stores new records under other ids while a later step names that table; what was already applied stays (nothing is rolled back) and the result lists the steps done, the failed one, and the ones not run. Any change discards the analysis results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product | Yes | ||
| operations | Yes | ||
| confirm_token | No |