Documentation for version v73
Selector
Description
Selector the pipe redirects events to different pipes based on the condition.
Peculiarities:
- If none of the conditions from
params.outsare met, the event will go toouts.success(if one is specified).
Structure
| Field | Type of value | Example | Required | Description |
|---|---|---|---|---|
| id | number | 10 | yes | Pipe's ID |
| type | string | "selector" | yes | Type of a pipe |
| params | SelectorParamsObject | no | Type-specific parameters | |
| outs | OutsObject | no | Pipe's outputs |
| SelectorParamsObject | |||||
|---|---|---|---|---|---|
| Field | Type | Example | Reqiered | Default | Description |
| outs | array (SelectorOutsObject) | yes | - | Array of outputs with conditions | |
| SelectorOutsObject | |||||
|---|---|---|---|---|---|
| Field | Type | Example | Reqiered | Default | Description |
| query | string | "($template.show_push = true)" | yes | - | JsonQL query that should return true or false |
| out | number | 15 | yes | - | ID of the pipe to which the event will go if the query is completed successfully. |
Errors
Error processing params.outs.query.
- Error executing JsonQL query.
Examples
{
"id": 15,
"type": "selector",
"params": {
"outs": [
{
"query": "('$template.show_push' = 'true')",
"out": 102
},
{
"query": "('$template.show_push' = 'false')",
"out": 103
}
]
},
"outs": {
"success": 104,
"error": 105
}
}{
"id": 15,
"type": "selector",
"params": {
"outs": [
{
"query": "('$in.data.status' = 'success')",
"out": 26
},
{
"query": "('$in.data.status' = 'error')",
"out": 27
}
]
}
"outs": {
"success": 28,
"error": 29
}
}