models-add_definition
models-add_definitionAdd a plan item definition to a draft model, with options for nesting inside stages, sentry guards and sources, or event listeners triggered by sentries.
Instructions
Adds a plan item definition to a draft model. Use parent_definition_id to nest items inside stages. For sentries, use guards_definition_id and source_definition_id. For event listeners, use triggers_sentry_definition_id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| definition_type | Yes | Type: task, stage, milestone, event_listener, sentry, process_definition | |
| discretionary | No | Is this a discretionary item? | |
| guards_definition_id | No | For sentry definitions: the definition ID this sentry guards. Sets guards_item on instantiation. | |
| manual_activation_rule | No | Expression/description for manual activation | |
| model_id | Yes | Model ID (@rid format) | |
| name | Yes | Definition name | |
| parent_definition_id | No | Parent definition ID (stage) for nesting. Creates ParentOf edge on instantiation. | |
| process_definition_definition_id | No | For task definitions: the process_definition definition ID to execute. Sets process_definition_id on instantiation. | |
| repetition_rule | No | Expression/description for repetition | |
| required_rule | No | Expression/description for required determination | |
| sequence_order | No | Suggested order within container | |
| source_definition_id | No | For sentry definitions: the definition ID that triggers this sentry. Sets source_ref on instantiation. | |
| template_data | No | Type-specific template data (e.g., task fields, sentry fields, event listener fields) | |
| triggers_sentry_definition_id | No | For event_listener definitions: the sentry definition ID to trigger when event fires. Sets triggers_sentry on instantiation. |