processors:operation_conditionnal

Performs conditional evaluations of expressions. Useful to directing a workflow to different path.

With this node you can evaluate complex expressions, by using variables/statics and functions, in order to alter the path of your workflow job. The node consists of eight (8) rows in which to populate your expressions. All the input fields accepts common mathematical symbols like **+**, **-**, *****, **/**, **^** and **()**.

An expression within one input field could look like:

* (%i_frames%/%f_fps)+100*

So if *%i_frames%* = 1750 and *%f_fps%* = 29.97 then the evaluation of the expression would be

(1750/29.96)+100=158.39

An expression is only valid when both input fields in one row are populated with either values, variables/statics, strings, functions, or a combination:

*If value/%variable%/"string"/$function() is <operator> value/%variable%/"string"/$function()*

So a valid full expression would look something like:

*If %i_fps%*2 is equal to (=) 25+25*

*If %s_original_path% is equal to (=) *\Incoming\MXF**

The three first operators (=, ==, ≠)are also valid for strings. Example:

*If %s_original_ext% is equal to (=) mov*

This would come out as true if %s_original_ext"=MOV. The "is equal to (=)"-operator is NOT case sensitive when used on strings. The "is exactly like (==)"-operator however is:

*If %s_original_ext% is exactly like(==) mov*

Unlike the previous example, this one would come out as __false__ if %s_original_ext%=MOV. Because"mov" and "MOV" is not exactly the same.

The last operator valid for strings are the "is not equal to (≠)"-operator:

*If %s_original_ext% is not equal to(*

This would come out as true if %s_original_ext%=mp4 and false if %s_original_ext%=mov.

One can also use wildcard (*) and questionmark (?) in strings. Wildcard (*) being one or more unknown character(s) and questionmark (?) being just __one__ unknown character. An exeption is when using the "is exactly like (==)"-operator. E.g. :

*If %s_original_ext% is equal to (=) m?v*

*If %s_original_ext% is equal to (=) m**

Both would come out as true if %s_original_ext%=mov. However:

*If %s_original_ext% is exactly like (==) m?v*

*If %s_original_ext% is exactly like (==) m**

Both would come out as __false__ if %s_original_ext%=mov. Because FFAStrans would take "**m?v**"and "**m***" as literal strings.

The evaluations of all expressions in the node will come out as either * true* or

You add new expressions by setting "Then" to either "And" or "Or" from the drop-down menu between each row. One node can have a maximum of eight (8) expressions. If you need more then you must chain 2 or more together.

Using "And", all conditions must be met for the node to come out true (Success). Example:

*1. If %f_fps% is equal to (=) 50*

*And*

*2. If %i_frames% is larger than (>) 3970*

*And*

*3. If %i_height% is smaller than (<) 1080*

*Then. . .*

If the evaluation of 1, 2 ** and** 3 are true, the node will come out as true (Success). If just

All "Or"'s are treated as "one or the other". Example:

*1. If %f_fps% is equal to (=) 50*

*Or*

*2. If %f_fps% is equal to (=) 25*

*Then. . .*

If the evaluation of __either__ 1 ** or** 2 is true then the node will come out true (Success).

One can group multiple "Or" like:

*1. If %f_fps% is equal to (=) 100*

*Or*

*2. If %f_fps% is equal to (=) 50*

*Or*

*3. If %f_fps% is equal to (=) 25*

*Then. . .*

Again, if just one of the three expressions are true, the conditional node will come out true (Success).

Of course you can combine "And" and "Or" to crate a more complex evaluation node. Example:

*1. If %f_fps% is equal to (=) 50*

*Or*

*2. If %f_fps% is equal to (=) 25*

*And*

*3. If %i_frames% is larger than (>) 3970*

*Or*

*4. If %i_frames% is equal to (<) 250*

*Then*

In this example, the conditional node will come out true (Success) if __either__ 1 ** or** 2 is true

__Dispel job instance on false/failed outcome.__

If this option is selected the job instance will "disintegrate" without logging anything to the monitor.

processors/operation_conditionnal.txt · Last modified: 2021/10/31 17:55 by benjamin