There are number of ways to store the submitted form data in the database of your choice. A JDBC data source can be used to directly store the data into the database. A custom OSGI bundle can be written to store the data into the database. This article uses custom process step in AEM workflow to store the data.
The use case is to trigger a AEM workflow on an Adaptive Form submission and a step in the workflow stores the submitted data into the data base.
Please follow the steps mentioned below to get this working on your system
Go to ConfigMgr
Search for “JDBC Connection Pool”. Create a new Day Commons JDBC Connection Pool. Specify the settings specific to your database.
Search for “Insert Form Data Into DB”
Specify the properties specific to your database.
Create an Adaptive Form.
Associate the Adaptive Form with AEM Workflow(StoreAFValuesinDB) as shown in the screen shot below.
Make sure you specify “data.xml” in the data file path as shown in the screen shot below
Preview the form and submit
If everything has gone well, you should see the Form Data being stored in the table and column specified by you