Conditional
Plugin version: 1.12.0
A control flow plugin that allows conditional execution within pipelines. The conditions are specified as expressions and the variables could include values specified as runtime arguments of the pipeline, token from plugins prior to the condition and global that includes global information about pipeline like stage, pipeline, logical start time and plugin.
Condition plugin specifies a boolean expression to be evaluated. During pipeline execution, the condition expression specified is evaluated resulting in boolean value (either true or false). Depending on the result of evaluation, either the downstream pipeline connected along true path is executed or along the false path is executed. At at point in time, only one path is executed.
More information can be found here
Examples:
Checks if the
runtimeargumentfilepathcontainsinput.runtime['filepath'] =~ ".*input_.*"Checks two
runtimeargumentsaandb.runtime['a'] > runtime['b']Checks
outputrecord count ofFileplugin fromtokenwithruntimevaluecount.token['File']['output'] > runtime['count']Checks
errorrecord count ofData Quality pluginfromtokenwithruntimevaluemax_errortoken['Data Quality']['error'] <= runtime['max_error'] (token['File']['output'] > runtime['count']) and (runtime['a'] > runtime['b']) (token['File']['output'] > runtime['count']) || (runtime['a'] > runtime['b']) token['File']['output'] < runtime['count'] && token['File']['error'] < 1Checks if a
runtimeargumentvalueis provided and it’s notnulland pluginFileerrorcount is less than 1.!isnull(runtime['value']) && token['File']['error'] < 1Takes the
maxof pluginFile1outputcount andFileoutputcount and checks if it’s greater thanruntimeargument that is specified as a macro.math:max(toDouble(token['File1']['output']), toDouble(token['File2']['output'])) > runtime[$variable]