control.collection.match ​
Match two record lists by exact or decimal-tolerance rules without guessing collisions
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-control |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
left_items | json | Yes | — | First list of records to match. |
right_items | json | Yes | — | Second list of records to match. |
rules | json | Yes | — | Non-empty list of {id?, left_field, right_field, op?, tolerance?} rules. Supported ops: eq (default), numeric_within, and numeric_within_abs (compares magnitudes — for ledgers whose sign conventions are opposite, e.g. a receivable against the bank posting that clears it). All rules must pass. |
max_comparisons | integer | No | 250000 | Maximum left/right pairs to evaluate; defaults to 250000 and cannot exceed 1000000. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
left_items | json | No | — | — |
right_items | json | No | — | — |
rules | json | No | — | — |
max_comparisons | integer | No | — | — |
matches | list | No | — | — |
ambiguous_pairs | list | No | — | — |
ambiguous_left_indexes | list | No | — | — |
ambiguous_right_indexes | list | No | — | — |
unmatched_left | list | No | — | — |
unmatched_right | list | No | — | — |
summary | json | No | — | — |
summary_text | string | No | — | — |
result | json | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "control.collection.match",
"initial_data": {
"left_items": "value",
"right_items": "value",
"rules": "value"
}
}