In Cflow, you can connect to an external database using a simple configuration instead of writing complex code. This will help you to connect to your in-house database and pull and push information easily. Follow the steps below to set up the configuration.
- Select Admin -> Workflows.
- Select a workflow then click on the External Database menu. Click on Add New to create an external database connection.
If you want to trigger the external database connection when a new form is initiated in Cflow, turn on the toggle Trigger on Form Load. You can also trigger the function/stored procedure call in the database when a field value is entered. In this case, when a field value is entered in the form, the stored procedure call is triggered.
The following properties must be defined to connect with an external database:
DB Connection Properties:
Database type – The type of database such as SQL Server, MySQL, Oracle, postgreSQL.
Server Name – The name of the external database server where the new database is to reside.
Username – The name of the user account having the right access to the database.
Password – The password for the user account.
Database name – The name of the database.
Procedure Name – The name of the stored procedure to be called from the database to perform a specific action.
Input Parameters – The Input parameters that are passed to the procedure.
Output Parameters – Select the Output Parameters from the list of field values where you want to return the values in a form.