control.predicate.compare ​
Compare two values with one operator, emitting a boolean result
Overview ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-control |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
a | json | No | — | Left-hand value to test. Required, but may be null for is_null/not_null checks. |
op | string | Yes | — | Comparison operator: eq, ne, in, not_in, truthy, falsy, gt, gte, lt, lte, contains, not_contains, regex, is_null, or not_null. |
b | json | No | — | Right-hand comparison value for binary operators such as eq, gt, contains, or regex. |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
a | json | No | — | Left-hand value echoed from input. |
op | string | No | — | Comparison operator echoed from input. |
b | json | No | — | Right-hand value echoed from input. |
result | boolean | No | — | Boolean result of the comparison. |
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.predicate.compare",
"initial_data": {
"op": "value"
}
}