Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this tutorial, we will following the guideline of developing a plugin to develop our Multi Store Binder plugin. Please also refer to the very first tutorial How to develop a Bean Shell Hash Variable and also the following JDBC store binder related plugin for more details steps.

...

1. What is the problem?

For integration purpose, we We would like to store our form data to a different database table instead of Joget form data tablerun multiple store binders plugins in a single store binder selection.

2. What is your idea to solve the problem?

Joget Workflow has provided a plugin type called Form Store Binder Plugin. We will develop one to support JDBC connection and custom query multiple selections of store binders to store form data.

3. What is the input needed for your plugin?

To develop a JDBC Multi Store binder, we will need the JDBC connection setting and also the custom query to store the form data based the collected form data.

Datasource: Using custom datasource or Joget default datasource

Custom JDBC Driver: The JDBC driver for custom datasource

Custom JDBC URL: The JDBC connection URL for custom datasource

Custom JDBC Username: The username for custom datasource

Custom JDBC Password: The password for custom datasource

SQL Check Exist Query: The query to check whether an insert or update query should be execute.

  1. Binders: Displays a list of store binders available.


  2. Comments: Additional notes users might wish to add.


4.

SQL Insert Query: The query to insert form data. 

SQL Update Query: The query to insert form data. 

SQL Delete Query: The query to delete deleted form data when used as multirow binder.

We will have to support a syntax to inject the form data to the query. "{foreignKey}" can be used for Multi Rows storing.

We will also need to support a syntax to inject UUID value. In this case, we will use "{uuid}".

 Example: INSERT INTO app_fd_test VALUES ({id}, {name}, {email}, {phone}, {foreignKey});

4. What is the output and expected outcome of your plugin?

All submitted data will store accordingly based on the check/insert/update querymultiple selection of store binders.

5. Is there any resources/API that can be reuse?

...