Logic Loop
This diagram element is used to perform an operation on an object repeatedly until a certain condition is met.
Diagram Element
Parameter Description
- Node Name: name of a node.
- Description: details of a node.
- Counter: flow variable that stores the number of elements in a list.
- Loops: objects to be traversed. Generally, the object list is the value obtained by the previous node, for example, the customer list obtained by a stored procedure.
- Loop Object: flow variable that stores the value of the object obtained each time when the object list is traversed.
In addition to four variables, the Logic Loop diagram element provides two default branches: inLoop and outLoop. The inLoop branch executes the logic when a loop is entered, that is, some actions during object list traversal. The outLoop branch executes the actions after object list traversal.
Condition Branch Description
Condition Branch |
Description |
Usage |
---|---|---|
inLoop |
Loop list traversing |
Triggered when the loop list traversing is not completed. |
outLoop |
Completed loop list traversing |
Triggered when the loop list traversing is completed. |
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 Logic Loop diagram element is used when an operation needs to be performed repeatedly until a certain condition is met.
Click the diagram element or drag it to the canvas, and set loop conditions and objects.
Typical Application Scenario
The following describes how to use the Logic Loop diagram element to combine strings using a loop.
- Sign in to the AICC and choose .
- Configure an intelligent IVR flow.
- Choose and click New to add a simple flow.
- Click + in the Flow Variable area. In the dialog box that is displayed, set the variable name and data type.
Figure 1 Flow variables to be added
Figure 2 Flow orchestration example (Logic Loop diagram element)
- The Robot Reply diagram element of the inLoop condition branch traverses FLOW.list and outputs the values in FLOW.list.
- The Robot Reply diagram element of the outLoop condition branch outputs FLOW.out, indicating that the loop ends.
- Save and publish the flow.
- Choose and bind the flow to a robot.
- Choose
. In the last column corresponding to the robot, click Test Call.In the test dialog box that is displayed, click Start Call to test the robot. If the robot outputs the combined string after the strings in the list are combined, the configuration is successful.Figure 3 Testing the robot
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot