github.com/argoproj/argo-events@v1.9.1/docs/sensors/filters/intro.md (about) 1 # Introduction 2 3 Filters provide a powerful mechanism to apply constraints on the events in order to determine a validity. 4 5 If filters determine an event is valid, this will trigger the action defined by the Sensor. 6 7 If filters determine an event is not valid, this won't trigger any action. 8 9 ## Types 10 11 Argo Events offers 5 types of filters: 12 13 1. [`Expr` Filter](expr.md) 14 1. [`Data` Filter](data.md) 15 1. [`Script` Filter](script.md) 16 1. [`Context` Filter](ctx.md) 17 1. [`Time` Filter](time.md) 18 19 > ⚠️ `PLEASE NOTE` this is the order in which Sensor evaluates filter types: expr, data, context, time. 20 21 ## Logical operator 22 23 Filter types can be evaluated together in 2 ways: 24 25 - `and`, meaning that all filters returning `true` are required for an event to be valid 26 - `or`, meaning that only one filter returning `true` is enough for an event to be valid 27 28 Any kind of filter error is considered as `false` (e.g. path not existing in event body). 29 30 Such behaviour can be configured with `filtersLogicalOperator` field in a Sensor dependency, e.g. 31 32 ```yaml 33 apiVersion: argoproj.io/v1alpha1 34 kind: Sensor 35 metadata: 36 name: multiple-filters-example 37 spec: 38 dependencies: 39 - name: sample-dependency 40 eventSourceName: webhook 41 eventName: sample-event 42 filtersLogicalOperator: "or" 43 filters: 44 # ... 45 ``` 46 47 Available values: 48 49 - `""` (empty), defaulting to `and` 50 - `and`, default behaviour 51 - `or` 52 53 > ⚠️ `PLEASE NOTE` Logical operator values must be `lower case`. 54 55 ## Examples 56 57 You can find some examples [here](https://github.com/argoproj/argo-events/tree/master/examples/sensors).