stream icon indicating copy to clipboard operation
stream copied to clipboard

Conditional filter

Open vpawar-tibco opened this issue 5 years ago • 4 comments

Added support to provide custom filter conditions in filter activity. Example usage - Filter all streams which meets certain condition e.g input value > threshold, input string contains keyword substring.

vpawar-tibco avatar Jun 26 '20 13:06 vpawar-tibco

CLA assistant check
All committers have signed the CLA.

flogo-oss avatar Jun 26 '20 13:06 flogo-oss

Hi @vpawar-ai, just to clarify, does "condition" is true just filter the specified value. When I think "condition" I think of an expression instead of a boolean. Should we let condition be string and options are "<,>,==,<=,>=, !=" ?

fm-tibco avatar Jun 26 '20 14:06 fm-tibco

Hi @fm-tibco, the "condition" input data type is boolean because it is expected that the filter expression evalutes to true or false. Example - for condition expression string.contains($pipeline.input,"keyword"), the activity will filter(skip) all the inputs matching the expression.

vpawar-tibco avatar Jun 26 '20 16:06 vpawar-tibco

Oh, I see the condition expression is actually external to the activity. You are using the result of a mapping expression and assigning that to the "condition".

It if this the case, I think we should try to come up with an alternative name. Basically when "true" you filter out the value, so make like a "force" or "explict" filter... @mellistibco any thoughts on a possible name for this?

fm-tibco avatar Jun 26 '20 18:06 fm-tibco