Logical Judgment

You are currently viewing the documentation for the latest version (2.2.0). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

Description

This Step performs logical judgment on the input data based on configured rules and outputs a Boolean result (True or False). The supported input data types include Number, String, and Bool.

Usage Scenario

This Step is designed for scenarios where data needs to be judged and routed based on multiple conditions. It can typically be used in conjunction with steps related to data processing or routing to automate data flow branching.

Workflow

The process of configuring this Step is shown below:

  1. Set the number of input ports.

  2. Configure the input. Connect the ports manually or select the input(s) under Input in the parameter configuration panel.

  3. Set the judgment rules. Add one or more judgment rules based on actual requirements. Each rule can contain multiple conditions to implement complex logical routing.

  4. Select the judgment mode. Select full judgment or sequential judgment according to the business requirements to determine the execution mode of the rules and the output port type.

  5. Run the Step, and view output.

Input Description

This Step supports multiple input ports, each of which can receive data in numeric, string, or Boolean format. All input data participates in subsequent logical judgments.

Parameter Description

Parameter Description

Number of input ports

This parameter is used to specify the number of input ports required for this step. The input data is used for logical judgment.

Judgment rules

Click the Open the editor button to open the editor. You can create one or more judgment rules, each containing one or more conditions. See Appendix: Setting Rules for instructions on setting judgment rules.

After the Step runs, each rule yields a Boolean result (True or False), with each result corresponding to a specific output port.

Judgment mode

This parameter is used to select the logical judgment mode: full judgment and sequential judgment.

  • Full judgment: This mode judges all rules one by one and outputs the judgment result of each rule in sequence. Recommended for scenarios where all rule judgment results need to be output for subsequent routing.

  • Sequential Judgment: This mode judges the rules in sequence. Once a rule is met (judged as True), judgment stops immediately, and the judgment results of the remaining rules are treated as False. In this mode, the Step outputs an extra default result. Recommended for scenarios where you only need to find the first rule that is met to stop judgment.

Output Description

For each judgment rule, the step outputs a Boolean result port. The output of each port is the judgment result (True or False) of the corresponding rule.

In the Sequential Judgment mode, in addition to the output port of each rule, the step also outputs a Default Result port (Bool type). When none of the rules are met, the Default Result is True; otherwise, it is False.

Appendix: Setting Rules

In the parameter configuration panel of the Logical Judgment Step, click the Open the editor button to open the Rule Setting window.

rule setting demo

Workflow of Setting Rules

The process of setting rules is as follows:

  1. In the upper left corner of the window, click the New rule button to create a new rule.

  2. Select a rule and then select the logical operation mode (AND or OR) for the rule:

    • AND: The rule evaluates to True only when all conditions within the rule are satisfied simultaneously.

    • OR: The rule evaluates to True if any condition within the rule is satisfied.

  3. Set conditions for rules. Click the Add a condition button to add a condition. After selecting a judgment port for the condition, you need to set a valid value.

  4. Repeat the above steps to create multiple rules.

  5. After configuration, click the Save button in the lower-right corner to save the rule settings and return to the parameter configuration panel of the Step.

Common Operations

The following are common operations in the Rules window:

  • Rename and Delete Rules

    Right-click the target rule in the Rules List and select Rename or Delete.

  • Delete Condition

    Find the target condition in the condition list, and click the delete icon in the row where the condition is located to delete the condition.

  • Set the Effective Status

    Find the target condition in the condition list, and click the switch icon on the line where the condition is located to switch the status (on/off) of the condition. When the condition is closed, it will not participate in the logical judgment of the rule.

  • Associated outputs of other Steps with valid values

    To set a valid value for a condition, click the Association icon on the right of the input box, select the output data of the Step to associate in the pop-up Data Association window, and then click the Confirm button to associate the data with a valid value for the condition. The associated data type must be the same as that of the conditional judgment port.

Troubleshooting

For common errors, see Error Code List.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.