Conditional Config Workflow Operation

ID: conditional-config


The conditional-config operation sets a workflow configuration variable based on conditions that are tested in sequence.

If condition-1 is true, value-1 is assigned to the variable, if condition-2 is true, value-2 is assigned, and so on. If no conditions are true, the value specified in no-match is assigned.

Conditions are tested in alphabetical order and the first condition that is true sets the variable so, if two conditions are true, the value is set by the first one that gets evaluated.

This operation is useful to reduce workflow complexity when the same operation is repeated many times and executed based on distinct if-conditions.

Parameter Table

configuration key description example
configuration-name Name of workflow configuration variable to be set encoding-profile
condition-X Condition to be tested, same syntax as workflow conditions (${presenter_work_resolution_x} > 1600)
value-X Value to be assigned to configuration variable if condition- is true encoding-profile-x
no-match Value to be assigned to configuration variable if none of the conditions are true encoding-profile-none

All condition-X are sorted as strings and then evaluated in sequence e.g. condition-1, condition-2, etc.


Set presenter encoding profile based on presenter/work media attributes:

<operation id="conditional-config" 
           description="Evaluate media properties and set presenter-encoding-profiles configuration">
        <configuration key="configuration-name">presenter-encoding-profiles</configuration>
        <configuration key="condition-1">
            (${presenter_work_framerate} == 25) AND (${presenter_work_resolution_x} &gt; 1600)
            AND (${presenter_work_bitrate} &gt; 1999999)
        <configuration key="value-1">
        <configuration key="condition-2">
            (${presenter_work_framerate} == 25) AND (${presenter_work_resolution_x} &gt; 1600)
            AND (${presenter_work_bitrate} &lt; 2000000) AND (${presenter_work_bitrate} &gt; 499999)
        <configuration key="value-2">
        <!-- More conditions omitted… -->
        <configuration key="no-match">

Then, use variable set above to encode the presenter file:

<operation id="multiencode"
           description="Encode to multiple delivery formats">
        <configuration key="source-flavors">presenter/work</configuration>
        <configuration key="target-flavors">*/delivery</configuration>
        <configuration key="target-tags">archive,engage</configuration>
        <configuration key="encoding-profiles">
        <configuration key="tag-with-profile">true</configuration>