Data Persistence

Within Camunda, you could use a Listener to execute the database inserts. In the workflow you can use a Listener to execute code before or after a task. In the case of the example I provided, you might be use an “Event end” Listener. When defining the Listener, you would set the “Listener Type” to “Java Class”. In the “Java Class” box, you would put the name of the Java class you created to perform the insert (example: com.ajr.StoreOrderForm). This class would need to made available within whatever Java container you are running Camunda.

You would create a table in the database that contains a column with a unique ID (example: the session ID) and columns for each line item of the order form (example: part number, quantity, cost, etc.). Once you retrieve the data from the list, you would insert records into the database using the unique ID column as the key. When you want to retrieve that particular order, you would select rows from the table that matched the unique ID.

This is an over simplification of what you would need to in the database itself. You would need a table for the customer information, a table for inventory, etc. But this is the basic idea of how you might store form data.

I am not an experienced Java or JavaScript programmer, so there are limits to what I can help you with here.

Michael