Stored Procedure
This diagram element uses a stored procedure to interact with the database.
Diagram Element
Parameter Description
- Node Name: name of a node.
- Description: details of a node.
- Stored Procedure: stored procedure added on the page.
- Cache Variable and Response Attribute: flow variables and their values. The output parameter returned by the stored procedure is valid only on the current node. If you want to use the value in subsequent flow nodes, define a cache variable here and assign the value of the output parameter to the cache variable.
- Condition and Condition Expression: branches of the exit of the current diagram element. For example, you can set a branch based on the value of an output parameter in the stored procedure. Different subsequent flows can be specified for each branch.
Using the Diagram Element
The Stored Procedure diagram element is used when data needs to be imported to the database. It cannot be used in public cloud scenarios. In scenarios where the OIAP is independently deployed, the database you access needs to be deployed in the same security zone as the OIAP for security purposes.
Currently, the stored procedure applications of the MySQL database, Oracle database, and GaussDB are supported.
Click the diagram element or drag it to the canvas, select the stored procedure to be invoked, set its input parameters, and add cache variables to temporarily save its output parameters. For the list type in output parameters, you need to set it separately based on rules.
Typical Application Scenario
The following describes how to use the Stored Procedure diagram element.
- Sign in to the AICC and choose .
- Configure a database.
- Contact the system administrator to add the database URL to the trustlist.
- Choose Create.
Figure 1 Configuring a stored procedure database
, click the Stored Procedure Databases tab, and click
- Configure a stored procedure.
- Obtain the developed stored procedure script. An example is as follows:
Figure 2 Stored procedure script example
- Choose Create.
Figure 3 Basic Information page
Figure 4 Input Parameter page
Figure 5 Output Parameter page
, click the Stored Procedures tab, and click
- Obtain the developed stored procedure script. An example is as follows:
- Configure an intelligent IVR flow. The usage of the Stored Procedure diagram element is similar to that of the Interface Invoking diagram element. Select the configured stored procedure, set input parameters, and assign output parameters to a variable as required.
- Choose Figure 6 System variable to be added
, click the Custom Variable tab, and click Create to add a system variable for receiving the output parameters of the stored procedure.
- Choose Figure 7 Flow orchestration example (Stored Procedure diagram element)
Use the reply variable GLOBAL.xxxx for the Robot Reply diagram element to reply the number output by the stored procedure to the customer.
and click New to add a simple flow.
- Save and publish the flow.
- Choose and bind the flow to a robot.
- Choose
- Choose and add a called route. Set the IVR to the added intelligent IVR.
- Log in to the OpenEye using a softphone number to simulate a customer, and dial the access code added on the Called Party page. If the robot can query the number output by the stored procedure based on the calling number and reply it to the customer, the configuration is successful.
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