Joget DX Preview Release Available for Download

Check out Joget DX, the next generation successor to Joget Workflow for faster, simpler digital transformation.

Skip to end of metadata
Go to start of metadata

Plugin Properties Options allowed us to provide an UI for user to configure a plugin. This tutorial is to demonstrate how we can make use of Element (Plugin) Select property type "elementselect" to achieve a dynamic and dependency configuration page.

In this tutorial, I will create a sample process tool which will print out all the values of the dependency fields in that plugin. Please download the source code and sample plugin KB:here.

As usual, we need a JSON file for plugin properties options in our plugin. My sample plugin only has 1 "elementselect" field named "option" and the url pointed to its own web service implementation to retrieve dependency properties options.

And then, create another 2 JSON files for properties options which dependent on value "option1" and "option2" as below:

Once we done the properties options JSON definition files, we need to implement the PluginWebSupport interface to return the dependency properties options based on the selected value. 

In my sample Process Tool plugin execute method, retrieve and print out the dependency options value.  

Below are some screenshots of the sample plugin.
Plugin properties configuration screen when Option is empty.

When Option 1 is selected, a new properties page is shown.

Dependency properties options based on Option 1.

Dependency properties options based on Option 2.

Plugin output when Option 1 is selected.

Plugin output when Option 2 is selected.

  • No labels