Versions Compared

Key

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

...

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

...

For integration purpose, we would like to load our form data from a different database table instead of Joget form data table.

2.

...

How to solve the problem?

Joget Workflow has provided a plugin type called Form Load Binder Plugin. We will develop one refer to the former to develop a plugin to support JDBC connection and custom query to load form data.

...

All retrieved columns are auto mapped to the fields with column name equal to field id. 

5.

...

Are there any resources/API that can be

...

reused?

We can refer to the implementation of other available Form Load Binder plugins. Joget default datasource can be retrieve with AppUtil.getApplicationContext().getBean("setupDataSource").

...

We need to always have our Joget Workflow Source Code ready and builded by following this guideline

The following of this tutorial is prepared with a Macbook Pro and Joget Source Code version 5.0.0. Please refer to Guideline for developing a plugin for other platform command.

Let said say our folder directory is as followingfollows

Code Block
- Home
  - joget
    - plugins
    - jw-community
      -5.0.0

The "plugins" directory is the folder we will create and store all our plugins and the "jw-community" directory is where the Joget Workflow Source code stored.

Run the following command to create a maven project in "plugins" directory.

Code Block
languagebash
cd joget/plugins/
~/joget/jw-community/5.0.0/wflow-plugin-archetype/create-plugin.sh org.joget.tutorial jdbc_load_binder 5.0.0

Then, the shell script will ask us to key in a version for your plugin and ask us for confirmation before generate the maven project.

Code Block
languagebash
Define value for property 'version':  1.0-SNAPSHOT: : 5.0.0
[INFO] Using property: package = org.joget.tutorial
Confirm properties configuration:
groupId: org.joget.tutorial
artifactId: jdbc_load_binder
version: 5.0.0
package: org.joget.tutorial
Y: : y

We should get "BUILD SUCCESS" message shown in our terminal and a "jdbc_load_binder" folder created in "plugins" folder.

Open the maven project with your favour IDE. I will be using NetBeans.  

...