Conditional branch

更新时间:
复制 MD 格式

1. Component introduction

Note

Prerequisites: None

You can use this component to set one or more conditional branches, such as if, elif, and else.

2. Inputs

Note

For more information about each input, see the help information in the component panel of the application flow editor.

3. Outputs

Note

For more information about each output, see the help information in the component panel of the application flow editor.

4. Component usage example

4.1. Component configuration example

  1. In the Branch Condition field, set the condition.

4.2. Example execution result

None

5. Example of building a flow

Setup flow

  1. Use the Loop by Count component to set the loop to execute 10 times.

  2. Use the Conditional Branch component to set one or more conditions.

  3. Use the Continue Loop component. If the first condition is met, the component skips the current iteration and starts the next one.

  4. Use the Record Log component. If the second condition is met, the component prints the value of the current loop item.

  5. Use the Break Loop component to exit the loop if neither of the preceding conditions is met.

    Note

    The conditions set in the conditional branch are evaluated sequentially from top to bottom. As shown in the following figure, you can change the order of the conditions in the green box on the right.

Execution result

As shown in the following figure, after the flow is successfully executed, the evaluation result is printed in the log panel.