queue.enqueue
Admit one unit of work into a keyed queue. Applies the admission policy (append / coalesce_latest / reject_duplicate) plus optional debounce, and returns the resulting item and effect.
Admit one item into a partitioned queue, applying the admission policy.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-queue |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | — |
queue_name | string | Yes | — | — |
partition_key | json | No | — | — |
target | dict | Yes | — | — |
payload | json | No | — | — |
owner_key | string | No | — | — |
producer_ref | string | No | — | — |
policy | dict | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
item | json | No | — | — |
item_uuid | string | No | — | — |
partition_key | string | No | — | — |
effect | string | No | — | — |
admitted | boolean | No | — | — |
superseded_uuid | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_layer | string | No | — | — |
failed_step | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
reason | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | Accepted |
completed | No | Yes | Yes | — | Completed |
failed | No | Yes | No | — | Failed |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | Run the queue operation |
* (any state) | fail | failed | Mark failed |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "queue.enqueue",
"initial_data": {
"organization_uuid": "value",
"queue_name": "value",
"target": "value"
}
}