Branch Judgment

This diagram element is used to judge branches.

Diagram Element

Parameter Description

  • Node Name: name of a node.
  • Description: details of a node.
  • Condition Name: Enter a condition name.
  • Conditional expressions: define the branches of the exit of the current diagram element. The options are Simple Expression and Complex Expression.
    Figure 1 Simple Expression and Complex Expression
  • Enter a conditional expression in the text box. The expression can contain the parameter name, value, and complex operation. After a series of operations, the complex expression returns a value of the Boolean type, for example, true or false.
    • The formats of flow variables, system variables, and global variables are as follows: FLOW.Parameter name, SYS.Parameter name, and GLOBAL.Parameter name.
    • The priorities of operators in a complex expression are as follows: brackets > arithmetic operators > relational operators > logical operators. Except for the arithmetic operators *, /, and %, which have higher priorities than + and -, the priorities of other operators at the same level are the same. The symbols of each type of operators are as follows:

      Parentheses: ()

      Arithmetic operator: *, /, %, +, and (The priorities of operators *, /, and % are higher than those of operators + and -.)

      Relational operators: >, >=, <, <=, ==, and !=

      Logical operators: && and ||

      In addition to basic logical expressions, functions based on the mvel2 expression are also supported. For example, the flow variable FLOW.testvalue is set to abc, and the contains function is used to determine whether the d character is contained. If the determination result is false, the branch is not executed.

      Similarly, simple functions may be used as follows:

      FLOW.testvalue.substring(0,1)=='d' checks whether the first character is d.

      FLOW.testvalue.endsWith('c') checks whether the value ends with c.

      If other functions are required, develop them under the guidance of Huawei engineers.

    • You can click Create to add multiple conditions, which can map different branches.

      A maximum of 20 condition branches are allowed.

    • Click to delete a condition.
    • Click Save to save all parameters set on the current page.
    • Branch Condition: Click the connection line between a branch judgment diagram element and a branch diagram element, and select the condition to enter the branch from the drop-down list. If no condition is selected, the branch is used as a default branch, which is executed when none of the conditions are met.

Condition Branch Description

Table 1 Condition branch description

Condition Branch

Description

Usage

SYSERROR_INNER

ODFS internal error

Triggered when an unknown error occurs in the ODFS. If no option is selected, the flow goes to the exception handling flow.

Using the Diagram Element

The Condition Judgment diagram element is used when branch flows need to be executed based on different conditions. It makes the flow logic clearer.

Click the diagram element or drag it to the canvas, and click under Condition Branch to add a conditional expression.

Typical Application Scenario

For details about how to use the Branch Judgment diagram element, see Typical Application Scenario. The typical application scenario of the Key Recognition diagram element involves the Branch Judgment diagram element.