SlideShare a Scribd company logo
All Rights Reserved © Joget Inc
Joget Workflow v6
Building Plugins
http://facebook.com/jogetworkflow
http://twitter.com/jogetworkflow
Last Revised on Oct 2018
All Rights Reserved © Joget Inc
Prerequisites
1. Basic web application development knowledge.
2. Java web application programming knowledge.
3. Understanding on Joget Workflow plugin architecture
and plugin types.
All Rights Reserved © Joget Inc
Content
1. Introduction
2. Creating a Process Tool Plugin
3. Creating a Userview Theme Plugin
4. Creating a Form Field Element Plugin
All Rights Reserved © Joget Inc
Chapter 1
Introduction
All Rights Reserved © Joget Inc
Introduction
• In this module, we will be learning on how to create:-
– Process Tool / Post Form Submission Processing plugin
– Userview plugin
– Form Field Element plugin
All Rights Reserved © Joget Inc
Plugin Types
All Rights Reserved © Joget Inc
Each plugin is different
• Before you embark on your journey to build a new plugin,
be sure to:-
– Each plugin may be implemented and configured (very)
differently.
– Check out existing implementation of the kind of plugin.
– Extend the necessary classes for each implementation.
All Rights Reserved © Joget Inc
Plugin Abstract Classes and Interface
• Deadline Plugins
extends org.joget.workflow.model.DefaultDeadlinePlugin
• Process Participant Plugins
extends org.joget.workflow.model.DefaultParticipantPlugin
• Process Tool / Post Form Submission Processing Plugins
extends org.joget.plugin.base.DefaultApplicationPlugin
• Form Field Element Plugins
extends org.joget.apps.form.model.Element
implements org.joget.apps.form.model.FormBuilderPaletteElement
All Rights Reserved © Joget Inc
Plugin Abstract Classes and Interface
• Form Load Binder Plugins
extends org.joget.apps.form.model.FormBinder
implements org.joget.apps.form.model.FormLoadBinder,
org.joget.apps.form.model.FormLoadElementBinder
• Form Options Binder Plugins
extends org.joget.apps.form.model.FormBinder
implements org.joget.apps.form.model.FormLoadOptionsBinder
• Form Store Binder Plugins
extends org.joget.apps.form.model.FormBinder
implements org.joget.apps.form.model.FormStoreBinder,
org.joget.apps.form.model.FormStoreElementBinder
All Rights Reserved © Joget Inc
Plugin Abstract Classes and Interface
• Form Validator Plugins
extends org.joget.apps.form.model.FormValidator
• Datalist Action Plugins
extends org.joget.apps.datalist.model.DataListActionDefault
• Datalist Binder Plugins
extends org.joget.apps.datalist.model.DataListBinderDefault
• Datalist Column Formatter Plugins
extends org.joget.apps.datalist.model.DataListColumnFormatDefault
• Userview Menu Plugins
extends org.joget.apps.userview.model.UserviewMenu
All Rights Reserved © Joget Inc
Plugin Abstract Classes and Interface
• Userview Permission Plugins
extends org.joget.apps.userview.model.UserviewPermission
• Userview Theme Plugins
extends org.joget.apps.userview.model.UserviewTheme
• Audit Trail Plugins
extends org.joget.plugin.base.DefaultAuditTrailPlugin
• Hash Variable Plugins
extends org.joget.apps.app.model.DefaultHashVariablePlugin
• Directory Manager Plugins
extends org.joget.plugin.base.ExtDefaultPlugin
implements org.joget.directory.model.service.DirectoryManagerPlugin,
org.joget.plugin.property.model.PropertyEditable
All Rights Reserved © Joget Inc
Introduction to Property Options
• Each plugin uses the Property Options template scheme
to provide an interface for app designer to configure the
eventual plugin.
• Reference:
http://dev.joget.org/community/display/KBv6/Plugin+Properties+Options
All Rights Reserved © Joget Inc
Property Options - Email Tool
All Rights Reserved © Joget Inc
Property Options - Email Tool
[
{
"title": "@@app.emailtool.config@@",
"properties": [
{
"name": "toSpecific",
"label": "@@app.emailtool.toEmail@@",
"type": "textfield"
},
{
"name": "toParticipantId",
"label": "@@app.emailtool.toPid@@",
"type": "textfield"
},
{
"name": "cc",
"label": "@@app.emailtool.cc@@",
"type": "textfield"
}, https://github.com/jogetworkflow/jw-community/blob/6.0-
SNAPSHOT/wflow-core/src/main/resources/properties/app/emailTool.json
All Rights Reserved © Joget Inc
Property Options
• JSON format
[
{
title : 'Page Title',
properties : [
{
name : 'Property Name',
label : 'Property Label',
description : 'Property Description', //optional, default is NULL
type : 'Property Type',
value : 'Property Value', //optional, default is null
required : 'Mandatory or Not', //optional, 'true' or 'false', default is
'false'
//… more attributes …
}, //… more fields …
],
validators : [ //optional
//… properties custom validators …
],
buttons : [ //optional
//… custom properties page buttons …
]
}, //… more properties page …
]
TIP: Just search online for
“JSON Beautifier” to properly
indent and format your JSON
definitiion.
All Rights Reserved © Joget Inc
Property Options Types
• From V4
– Check Box– CheckBox
– Element Select Box – ElementSelect
– Grid – Grid
– Hidden Field– Hidden
– HTML Editor– HtmlEditor
– Multi Select Box– MultiSelect
– Password Field – Password
– Radio Button – Radio
– Readonly Text Field– Readonly
– Select Box– SelectBox
– Text Area – TextArea
– Text Field – TextField
All Rights Reserved © Joget Inc
Property Options Types
• New in V5
– Code Editor – CodeEditor
– Combine Grid – GridCombine
– Fixed Row Grid – GridFixedRow
– Header – Header
– Label – Label
All Rights Reserved © Joget Inc
Property Options Types
• New in V6
– File – File
– Image – Image
Please refer to
https://dev.joget.org/community/display/KBv6/Plugin+Properties+Options
latest documentation.
All Rights Reserved © Joget Inc
Common Attributes for All Property Options
Type except Hidden Field and Grid
{
name : ‘Property Name’,
label : ‘Property Label’,
description : ‘Property Description’, //optional, default is NULL
type : ‘readonly’,
value : ‘Property Value’, //optional , default is empty string
required : ‘true’, //optional, boolean value, default is false
}
All Rights Reserved © Joget Inc
Extra Attributes for Text Field, Password
Field, Text Area and HTML Editor
{
size : ‘50’, //optional , integer value, default is NULL, only for
text field and password field
maxlength : ‘50’, //optional, integer value, default is NULL, only
for text field and password field
rows : ‘50’, //optional, integer value, default is NULL, only for
text area and html editor
cols : ‘50’, //optional, integer value, default is NULL , only for
text area and html editor
regex_validation : ‘^[a-zA-Z0-9_]+$’, //optional, default is NULL
validation_message : ‘Error!!’ //optional, default is NULL
}
All Rights Reserved © Joget Inc
Extra Attributes for Checkbox, Radio
Button, Select Box and Multi Select Box
{
size : ‘10’, //optional, integer value, default is 4, only for multi
select box
options : [ //is optional to use this attribute or options_ajax
{value: ‘value1’, label : ‘Value 1’},
{value: ‘value2’, label : ‘Value 2’},
{value: ‘value3’, label : ‘Value 3’}
],
options_ajax_on_change : ‘property1’, //optional, value of this
property name will passed over to load options from ajax, only for
select box and multi select box
options_ajax : ‘URL to load options JSON’ //optional, URL return
JSON Array of a set of Objects that have value & label attribute
}
All Rights Reserved © Joget Inc
Attributes for Hidden Field
{
name : ‘Property Name’,
type : ‘hidden’,
value : ‘Property Value’
}
All Rights Reserved © Joget Inc
Attributes for Grid
{
name : ‘Property Name’,
label : ‘Property Label’,
description : ‘Property Description’, //optional, default is NULL
type : ‘grid’,
columns : [ // 2 type of column, with and without options attribute
{key : ‘col1’, label : ‘Col 1’},
{key : ‘col2’, label : ‘Col 2’,
options:[
{value :‘option1’, label : ‘Option 1’},
{value :‘option2’, label : ‘Option 2’}
]
},
]
value : [ //optional, default is NULL
{col1 : ‘abc’, col2 : ‘option1’},
{col1 : ‘def’, col2 : ‘option2’}
],
required : ‘true’, //optional, boolean value, default is false
}
All Rights Reserved © Joget Inc
Extra Attributes for Element Select Field
{
options_ajax_on_change : ‘property1’, //optional, value of this
property name will passover to load options from ajax
options_ajax :
‘[CONTEXT_PATH]/web/property/json/getElements?classname=
org.joget.apps.form.model.FormLoadElementBinder’, //Load plugin list
based on class name given
url : ‘[CONTEXT_PATH]/web/property/json/getPropertyOptions’ //Load
plugin properties
}
All Rights Reserved © Joget Inc
Property Validator Types
• Currently only one validator type supported - AJAX
{
type : ‘AJAX’,
url : ‘URL to validate properties page value’ ,
// All properties in the same page will send to this url to validate,
URL return a JSON Object with status (success or fail) & message
(JSONArray of String) attribute
default_error_message : ‘Error in this page!!’ //optional, default is
null
}
All Rights Reserved © Joget Inc
Internationalization Support
• You may localise your plugin.
All Rights Reserved © Joget Inc
1. In the getPropertyOptions() method of your plugin,
make reference to the message key properties file
Example:
1. Create the corresponding file (e.g.
formDataUpdateTool.properties) in
“src/main/resources/messages” folder.
Internationalization Support
return AppUtil.readPluginResource(getClass().getName(),
"/properties/formDataUpdateTool.json", null, true,
"/messages/formDataUpdateTool");
All Rights Reserved © Joget Inc
Common Plugin Utility Methods
• Get a bean from application context
DirectoryManager dm = (DirectoryManager)
AppUtil.getApplicationContext().getBean(“directoryManager”);
• Read a resource file as String from resources folder
String resource = AppUtil.readPluginResource(getClass().getName(),
"/properties/plugin.json", new String[]{“value 1”, “value 2”}, true,
"message/pluginResouseBundle");
Bean Name
Argument used for
String.format()
Remove new line char
Plugin Class NamePath to resource file in
resources folderPath to message bundle
in resources folder,
without .properties file
extension
All Rights Reserved © Joget Inc
Common Plugin Utility Methods
• Processing Hash Variable to a String
content = AppUtil.processHashVariable(content, workflowAssignment,
StringUtil.TYPE_REGEX, replaceMap);
• Get a i18n message from message bundle
String message = AppPluginUtil.getMessage(“Label”, getClass().getName(),
"message/pluginResouseBundle")
Content to be process Workflow Assignment ObjectString escape type,
TYPE_REGEX,
TYPE_JSON or null
A map contains Strings to be replace
Path to message bundle in resources
folder, without .properties file
extension
Message Key Plugin Class Name
All Rights Reserved © Joget Inc
Common Plugin Utility Methods
• Get parameter name of Form Element
String param = FormUtil.getElementParameterName(this);
• Get value of Form Element
String value = FormUtil.getElementPropertyValue(this, formData);
All Rights Reserved © Joget Inc
Common Plugin Utility Methods
• More at
http://dev.joget.org/community/pages/viewpage.action?pageId=19103970
All Rights Reserved © Joget Inc
Plugin Web Support
• Provides an interface that enables you to implement your
Web Service in a plugin.
• How to invoke/call?
– URL Pattern
• {Context Path}/web/json/plugin/{Plugin Class Name}/service
• Example:
http://localhost:8080/jw/web/json/plugin/org.joget.sample.lib.SimpleFor
mElement/service?say_something=Hello World
– URL Pattern
• {Context Path}/web/json/app/{App Id}/{App Version}/plugin/{Plugin Class
Name}/service
• Example:
http://localhost:8080/jw/web/json/app/crm/1/plugin/org.joget.sample.lib
.SimpleFormElement/service?say_something=Hello World
All Rights Reserved © Joget Inc
Plugin Web Support
• implements org.joget.plugin.base.PluginWebSupport
• Implement webService method
• Example:
public void webService(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
//get request parameter
String param = request.getParameter("param");
//print json response
JSONArray jsonArray = new JSONArray();
Map<String, String> option1 = new HashMap<String, String>();
option1.put("value", "value1"); option1.put("label", "Value 1");
jsonArray.put(option1);
Map<String, String> option2 = new HashMap<String, String>();
option2.put("value", "value2"); option2.put("label", "Value 2");
jsonArray.put(option2);
jsonArray.write(response.getWriter());
}
All Rights Reserved © Joget Inc
Plugin Web Support
• Add the following dependency into your pom.xml file.
• Read more at https://dev.joget.org/community/display/KBv6/Web+Service+Plugin
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
</dependency>
All Rights Reserved © Joget Inc
Chapter 2
Creating a Process Tool
Plugin
All Rights Reserved © Joget Inc
Building Your First Plugin
• No, we are not going to build a “Hello World”
• Build a simple tool to update form data in a process
• Scenario:
All Rights Reserved © Joget Inc
Simple Form Data Update Tool
1. Create a Maven project.
2. Open the maven project in NetBeans.
3. Create a class and extend DefaultApplicationPlugin
abstract class.
4. Implement all the standard plugin method.
5. Register plugin class in Activator class.
6. Decide the property options for the plugin.
7. Implement execute method to update form data.
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven
project for your plugin.
• For Windows:
1. Create a directory to contain your plugins. (E.g. “C:joget-projects”)
2. In Command Prompt, navigate to the newly created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample sample-
plugin-pack 6.0-SNAPSHOT”
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
• For Linux:
1. Create a directory at home directory to contain your plugins.
(E.g. “~joget-projects”)
2. In Command Terminal, go to the created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample sample-
plugin-pack 6.0-SNAPSHOT
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
C:joget-projects>“C:jw-communitybranches6.0-SNAPSHOTwflow-plugin-archetypecreate-plugin.bat" org.joget.sample
sample-plugin-pack 6.0-SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
Downloading: http://dev.joget.org/archiva/repository/snapshots2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-
metadata.xml
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
[INFO] Using property: groupId = org.joget.sample
[INFO] Using property: artifactId = sample-plugin-pack
Define value for property 'version': 1.0-SNAPSHOT: : 6.0-SNAPSHOT
[INFO] Using property: package = org.joget.sample
Confirm properties configuration:
groupId: org.joget.sample
artifactId: sample-plugin-pack
version: 6.0-SNAPSHOT
package: org.joget.sample
Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-
archetype:6.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.joget.sample
[INFO] Parameter: packageName, Value: org.joget.sample
[INFO] Parameter: package, Value: org.joget.sample
[INFO] Parameter: artifactId, Value: sample-plugin-pack
[INFO] Parameter: version, Value: 6.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:joget-projectssample-plugin-pack
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• Open the newly created project in your IDE (i.e. Netbeans).
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• pom.xml
– POM stands for "Project Object Model“, an XML representation
of a Maven project
– Used to manage your plugin dependencies jar
• Activator.java
– Bundle Activator for OSGi framework
– The activator class is the bundle's hook to the lifecycle layer for
management.
– Used to register your plugin class in start method
All Rights Reserved © Joget Inc
Creating a Plugin Class
1. In your Maven project, create a plugin class call
“SimpleFormDataUpdateTool”.
2. Extends org.joget.plugin.base.DefaultApplicationPlugin
3. Import required class file
4. Implement all abstract methods
All Rights Reserved © Joget Inc
Standard Plugin Methods
public String getClassName() {
return getClass().getName(); //plugin class name, MUST be the exact class name of the plugin
}
public String getName() {
return "Plugin Name"; //Unique indentifier of plugin, override plugin with same name, used to
display in Manage Plugin
}
public String getDescription() {
return "Plugin Description"; //Used to display in Manage Plugin
}
public String getVersion() {
return “1.0.0"; //Plugin Version, used to display in Manage Plugin
}
public String getLabel() {
return "Plugin Label"; //Short Label, used to display in plugin select box
}
public String getPropertyOptions() {
return ""; //Plugin property options, in JSON format
}
All Rights Reserved © Joget Inc
Update Plugin Information
public String getName() {
return “Simple Form Data Update Tool";
}
public String getVersion() {
return “1.0.0";
}
public String getDescription() {
return “Update form data in a Process.";
}
public String getLabel() {
return “Simple Form Data Update Tool";
}
public String getClassName() {
return getClass().getName();
}
public String getPropertyOptions() {
return "";
}
All Rights Reserved © Joget Inc
Register Your Plugin Class
1. Open Activator.java
2. Add the code below to start method
//Register plugin here
registrationList.add(context.registerService(SimpleFormDataUpdateTool.class.getName(),
new SimpleFormDataUpdateTool(), null));
All Rights Reserved © Joget Inc
Decide Your Plugin Property Options
• What kind of information needed from user?
– Which form to update?
– Which record in the form data?
– Which fields to modify?
– What is the value need to set to the particular field?
All Rights Reserved © Joget Inc
Decide Your Plugin Property Options
• What kind of information needed from user?
– Q: Which form to update?
A: a select box with all available form listed
– Q: Which record in the form data?
A: Use process’s record id if not specify (in the grid)
– Q: Which fields to modify?
A: A grid with all the field ids and it’s value to update
– Q: What is the value need to set to the particular field?
A: Answer as above
All Rights Reserved © Joget Inc
Create Your Plugin Properties
1. In your Maven project, right and create new folder
2. Key in “src/main/resources/properties” and press Finish
3. Under “Other Sources” > “src/main/resources” >
“properties”, create a new Empty File named
“simpleFormDataUpdateTool.json”
4. Put the following code in your public String
getPropertyOptions() method
1. Construct your plugin properties in
“simpleFormDataUpdateTool.json”.
return AppUtil.readPluginResource(getClass().getName(),
"/properties/simpleFormDataUpdateTool.json", null, true, null);
All Rights Reserved © Joget Inc
formDataUpdateTool.json
[{
title : 'Configure Simple Form Data Update Tool',
properties : [{
name : 'formDefId',
label : 'Form',
type : 'SelectBox',
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options',
required : 'true'
},{
name : 'fields',
label : 'Update Fields',
type : 'Grid',
columns : [{
key : 'field',
label : 'Field Id'
},
{
key : 'value',
label : 'Value'
}],
required : 'true'
}]
}]
All Rights Reserved © Joget Inc
Implement Execute Method
1. Get FormDefId from properties
2. Get record Id from process
3. Check whether record Id is configured to different value
in properties grid
4. Load the original Form Data record
5. Set the updated fields and it’s value to the loaded data
6. Store the updated data
All Rights Reserved © Joget Inc
Implement Execute Method
//Get FormDefId from properties
String formDefId = (String) props.get("formDefId");
//Get record Id from process
WorkflowAssignment wfAssignment = (WorkflowAssignment) props.get("workflowAssignment");
AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService");
String id = appService.getOriginProcessId(wfAssignment.getProcessId());
//Check whether record Id is configured to different value in properties grid
Object[] fields = (Object[]) props.get("fields");
for (Object o : fields) {
Map mapping = (HashMap) o;
String fieldName = mapping.get("field").toString();
if (FormUtil.PROPERTY_ID.equals(fieldName)) {
String fieldValue = mapping.get("value").toString();
id = fieldValue;
break;
}
}
All Rights Reserved © Joget Inc
Implement Execute Method
//Load the original Form Data record
AppDefinition appDef = (AppDefinition) props.get("appDef");
FormRow row = new FormRow();
FormRowSet rowSet = appService.loadFormData(appDef.getAppId(), appDef.getVersion().toString(),
formDefId, id);
if (!rowSet.isEmpty()) {
row = rowSet.get(0);
}
//Set the updated fields and it’s value to the loaded data
for (Object o : fields) {
Map mapping = (HashMap) o;
String fieldName = mapping.get("field").toString();
String fieldValue = mapping.get("value").toString();
row.setProperty(fieldName, fieldValue);
}
//Store the updated data
rowSet.set(0, row);
appService.storeFormData(appDef.getAppId(), appDef.getVersion().toString(), formDefId, rowSet,
id);
return null;
All Rights Reserved © Joget Inc
1. In your Maven project, right and create new folder
2. Key in “src/main/resources/messages” and press Finish
3. Under “Other Sources” > “src/main/resources” > “messages”, create a
new Properties File (eg “simpleFormDataUpdateTool.properties”)
4. Modify code in your public String getPropertyOptions() method
i18n your Plugin Properties
return AppUtil.readPluginResource(getClass().getName(),
"/properties/simpleFormDataUpdateTool.json", null, true,
"/messages/simpleFormDataUpdateTool");
5. Modify label to key in your plugin properties file.
6. Create keys and messages in your
simpleFormDataUpdateTool.properties file.
All Rights Reserved © Joget Inc
New simpleFormDataUpdateTool.json
with message key
[{
title : '@@sfdut.config@@',
properties : [{
name : 'formDefId',
label : '@@sfdut.form@@',
type : 'selectbox',
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options',
required : 'true'
},{
name : 'fields',
label : '@@sfdut.fields@@',
type : 'grid',
columns : [{
key : 'field',
label : '@@sfdut.fieldId@@'
},
{
key : 'value',
label : '@@sfdut.value@@'
}],
required : 'true'
}]
}]
All Rights Reserved © Joget Inc
[{
title : '@@sfdut.config@@',
properties : [{
name : 'formDefId',
label : '@@sfdut.form@@',
type : 'selectbox',
options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options',
required : 'true'
},{
name : 'fields',
label : '@@sfdut.fields@@',
type : 'grid',
columns : [{
key : 'field',
label : '@@sfdut.fieldId@@'
},
{
key : 'value',
label : '@@sfdut.value@@'
}],
required : 'true'
}]
}]
simpleFormDataUpdateTool.properties
sfdut.config=Configure Simple Form Data Update Tool
sfdut.form=Form
sfdut.fields=Update Fields
sfdut.fieldId=Field Id
sfdut.value=Value
All Rights Reserved © Joget Inc
Build and upload
• When you are ready, build the project by running the
following command in your project path.
• Obtain the .jar file generated and upload into Joget
Workflow.
mvn clean install
All Rights Reserved © Joget Inc
Test and Run Your Plugin
App Designer’s view
• Map the plugin to one of your “Tool” to a process.
Process flow - Activity > Tool > Activity
OR
• Map the plugin to a form’s post form processing.
All Rights Reserved © Joget Inc
Process flow - Activity > Tool > Activity App Designer’s view
End user assignment view
End user assignment view
All Rights Reserved © Joget Inc
Process flow - Activity > Tool > Activity App Designer’s view
End user assignment view
End user assignment view
• After form submitted, process tool will trigger the plugin,
and when viewing the form again, value is updated.
All Rights Reserved © Joget Inc
Exercise
• Did you notice that this plugin is very similar to “Form
Data Update Tool” plugin already available in your copy
of Joget Workflow?
All Rights Reserved © Joget Inc
Exercise
• Compare it with our current plugin.
• Try to create a drop down list of fields based on the form
selected in dropdown above.
All Rights Reserved © Joget Inc
Materials
• Completed project files can be obtained at
17-2-sample-plugin-pack.zip
All Rights Reserved © Joget Inc
Chapter Review
• Be able to prepare a new Maven project.
• Be able to build a plugin and run it in Joget.
All Rights Reserved © Joget Inc
Chapter 3
Creating a Userview Theme
Plugin
All Rights Reserved © Joget Inc
Creating a Userview Theme Plugin
• Study the existing implementation of other existing
Userview Themes.
– Open “DefaultTheme.java”
– Locate relevant files that made up of the plugin.
@Override
public String getCss() {
String css = AppUtil.readPluginResource(getClassName(),
"/resources/themes/default/default.css");
css += getPropertyString("css");
css = css.replaceAll("@@contextPath@@", getRequestParameterString("contextPath"));
return css;
}
public String getPropertyOptions() {
return AppUtil.readPluginResource(getClass().getName(),
"/properties/userview/defaultTheme.json", null, true, "message/userview/defaultTheme");
}
All Rights Reserved © Joget Inc
Study the file structure
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven
project for your plugin.
• For Windows:
1. Create a directory to contain your plugins. (E.g. “C:joget-projects”)
2. In Command Prompt, navigate to the newly created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample theme-
plugin-pack 6.0-SNAPSHOT”
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
• For Linux:
1. Create a directory at home directory to contain your plugins.
(E.g. “~joget-projects”)
2. In Command Terminal, go to the created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample theme-
plugin-pack 6.0-SNAPSHOT
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
C:joget-projects>C:jw-communitytrunkwflow-plugin-archetypecreate-plugin.bat org.joget.sample theme-pack 6.0-
SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread
count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
Downloading: http://repo1.maven.org/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
[INFO] Using property: groupId = org.joget.sample
[INFO] Using property: artifactId = theme-pack
Define value for property 'version': 1.0-SNAPSHOT: 6.0-SNAPSHOT
[INFO] Using property: package = org.joget.sample
Confirm properties configuration:
groupId: org.joget.sample
artifactId: theme-pack
version: 6.0-SNAPSHOT
package: org.joget.sample
Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:6.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.joget.sample
[INFO] Parameter: packageName, Value: org.joget.sample
[INFO] Parameter: package, Value: org.joget.sample
[INFO] Parameter: artifactId, Value: theme-pack
[INFO] Parameter: version, Value: 6.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:joget-projectstheme-pack
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• Open the newly created project in your IDE (i.e. Netbeans).
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• pom.xml
– POM stands for "Project Object Model“, an XML representation
of a Maven project
– Used to manage your plugin dependencies jar
• Activator.java
– Bundle Activator for OSGi framework
– The activator class is the bundle's hook to the lifecycle layer for
management.
– Used to register your plugin class in start method
All Rights Reserved © Joget Inc
Creating a Plugin Class
1. In your Maven project, create a plugin class call
“EnhancedTheme”.
2. Extends UserviewTheme
3. Import required class file
4. Implement all abstract methods
All Rights Reserved © Joget Inc
Register Your Plugin Class
1. Open Activator.java
2. Add the code below to start method
//Register plugin here
registrationList.add(context.registerService(EnhancedTheme.class.ge
tName(), new EnhancedTheme(), null));
All Rights Reserved © Joget Inc
Implementing the methods
• You may copy the existing implementations of
DefaultTheme.
• Replace where applicable.
public String getCss() {
String css = AppUtil.readPluginResource(getClassName(),
"/resources/themes/enhanced/enhanced.css");
public String getName() {
return "Enhanced Theme";
public String getPropertyOptions() {
return AppUtil.readPluginResource(getClass().getName(),
"/properties/userview/enhancedTheme.json", null, true,
"/messages/userview/enhancedTheme");
}
public String getLabel() {
return "Enhanced Theme";
All Rights Reserved © Joget Inc
Creating the supporting files
• resources/themes/enhanced/enhanced.css
• resources/themes/enhanced/header.png
• properties/userview/enhancedTheme.json
• messages/userview/enhancedTheme.properties
All Rights Reserved © Joget Inc
Get Creative
• Get Creative! Create your theme accordingly by tweaking
the CSS.
• You may also add in your own scripting if required.
All Rights Reserved © Joget Inc
Build and upload
• When you are ready, build the project by running the
following command in your project path.
• Obtain the .jar file generated and upload into Joget
Workflow.
mvn clean install
All Rights Reserved © Joget Inc
Build and upload
• Test out the theme in an actual Userview.
• Repeat as many times as needed too until you achieve
what you want.
All Rights Reserved © Joget Inc
Original Theme
All Rights Reserved © Joget Inc
New Theme
All Rights Reserved © Joget Inc
Exercise
• Try to modify the CSS or Javascript to change its
background.
All Rights Reserved © Joget Inc
Exercise
All Rights Reserved © Joget Inc
Materials
• You may obtain project source code of the sample new
theme showcased in this chapter from the file
17-3-theme-pack.zip
• Modified theme with rotating background available from
the file 17-3-theme-pack-background.zip
All Rights Reserved © Joget Inc
Chapter Review
• Be able to create a Userview Theme plugin.
All Rights Reserved © Joget Inc
Chapter 4
Creating a Form Field
Element Plugin
All Rights Reserved © Joget Inc
What are we going to build?
• We are going to build a Form Field Element that works
very similarly like a Text Field but…
– By incorporating the use of a jQuery plugin that automatically
formats currency and numbers as you type on form inputs.
– Reference: http://www.decorplanit.com/plugin/
All Rights Reserved © Joget Inc
Creating a Form Field Element Plugin
• Study the existing implementation of other existing form
field elements.
– Open “TextField.java”, locate relevant files that made up of the plugin.
@Override
public String getPropertyOptions() {
...
return AppUtil.readPluginResource(getClass().getName(),
"/properties/form/textField.json", new Object[]{encryption}, true,
"message/form/TextField");
}
@Override
public String getFormBuilderIcon() {
return
"/plugin/org.joget.apps.form.lib.TextField/images/textField_icon.gif";
}
@Override
public String renderTemplate(FormData formData, Map dataModel) {
String template = "textField.ftl";
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven
project for your plugin.
• For Windows:
1. Create a directory to contain your plugins. (E.g. “C:joget-projects”)
2. In Command Prompt, navigate to the newly created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample currency-
pack 6.0-SNAPSHOT”
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
• For Linux:
1. Create a directory at home directory to contain your plugins.
(E.g. “~joget-projects”)
2. In Command Terminal, go to the created directory.
3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample currency-
pack 6.0-SNAPSHOT
4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
C:joget-projects>C:jw-communitytrunkwflow-plugin-archetypecreate-plugin.bat org.joget.sample currency-pack 6.0-
SNAPSHOT
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread
count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom ---
[INFO] Generating project in Interactive mode
[WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2).
[WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere.
Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
Downloading: http://repo1.maven.org/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
All Rights Reserved © Joget Inc
Creating a Maven Project for Your Plugin
• Windows
[INFO] Using property: groupId = org.joget.sample
[INFO] Using property: artifactId = currency-pack
Define value for property 'version': 1.0-SNAPSHOT: 6.0-SNAPSHOT
[INFO] Using property: package = org.joget.sample
Confirm properties configuration:
groupId: org.joget.sample
artifactId: currency-pack
version: 6.0-SNAPSHOT
package: org.joget.sample
Y: : Y
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:6.0-SNAPSHOT
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: org.joget.sample
[INFO] Parameter: packageName, Value: org.joget.sample
[INFO] Parameter: package, Value: org.joget.sample
[INFO] Parameter: artifactId, Value: currency-pack
[INFO] Parameter: version, Value: 6.0-SNAPSHOT
[INFO] project created from Old (1.x) Archetype in dir: C:joget-projectscurrency-pack
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• Open the newly created project in your IDE (i.e. Netbeans).
All Rights Reserved © Joget Inc
What is Inside The Maven Project
• pom.xml
– POM stands for "Project Object Model“, an XML representation
of a Maven project
– Used to manage your plugin dependencies jar
• Activator.java
– Bundle Activator for OSGi framework
– The activator class is the bundle's hook to the lifecycle layer for
management.
– Used to register your plugin class in start method
All Rights Reserved © Joget Inc
Creating a Plugin Class
1. In your Maven project, create a plugin class call
“CurrencyField”.
2. Extends Element implements
FormBuilderPaletteElement
3. Import required class file
4. Implement all abstract methods
All Rights Reserved © Joget Inc
Register Your Plugin Class
1. Open Activator.java
2. Add the code below to start method
//Register plugin here
registrationList.add(context.registerService(CurrencyField.class.getName(), new
CurrencyField(), null));
All Rights Reserved © Joget Inc
Implementing the methods
• You may copy the existing implementations of TextField.
• Replace where applicable.
All Rights Reserved © Joget Inc
Property Options
All Rights Reserved © Joget Inc
Property Options
All Rights Reserved © Joget Inc
Creating the supporting files
• resources/message/form/currencyField.properties
• resources/properties/form/currencyField.json
• resources/resources/images/currencyField_icon.gif
• resources/resources/js/autoNumeric.js
• resources/templates/currencyField.ftl
All Rights Reserved © Joget Inc
Build and upload
• When you are ready, build the project by running the
following command in your project path.
• Obtain the .jar file generated and upload into Joget
Workflow.
mvn clean install
All Rights Reserved © Joget Inc
Build and upload
• Test out the form element field in actual Form.
• Repeat as many times as needed too until you achieve
what you want.
All Rights Reserved © Joget Inc
Materials
• You may obtain project source code of the sample new
theme showcased in this chapter from the file
17-4-currency-pack.zip
All Rights Reserved © Joget Inc
Chapter Review
• Be able to create a Form Field Element plugin.
All Rights Reserved © Joget Inc
Module Review
1. Introduction
2. Creating a Process Tool Plugin
3. Creating a Userview Theme Plugin
4. Creating a Form Field Element Plugin
All Rights Reserved © Joget Inc
Recommended Further Learning
• Study on how other plugin types are implemented.
– Check out the Joget Marketplace at
http://marketplace.joget.org/
– Check out the Joget Knowledge Base – Developer Guide
https://dev.joget.org/community/display/KBv6/Developing+Plugins
All Rights Reserved © Joget Inc
Stay Connected with Joget Workflow
• http://www.joget.org
• http://community.joget.org
• http://twitter.com/jogetworkflow
• http://facebook.com/jogetworkflow
• http://youtube.com/jogetworkflow
• http://slideshare.net/joget

More Related Content

What's hot

Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
Aleks Zinevych
 
Mobile phone applications
Mobile phone applicationsMobile phone applications
Mobile phone applications
Nazish khalid
 
Json
JsonJson
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
Vijay Rangaiah
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
valuebound
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!
Baharika Sopori
 
Introduction to xcode
Introduction to xcodeIntroduction to xcode
Introduction to xcodeSunny Shaikh
 
Exception handling
Exception handlingException handling
Exception handling
Anna Pietras
 
java mini project for college students
java mini project for college students java mini project for college students
java mini project for college students
SWETALEENA2
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
Bojan Golubović
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
Zeba Tahseen
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?
Ido Green
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
Mahmudul Hasan
 
React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation Component
Łukasz Ciupa
 
Selenium
SeleniumSelenium
Selenium
mdfkhan625
 
Swagger
SwaggerSwagger
Java Presentation
Java PresentationJava Presentation
Java Presentationaitrichtech
 
React js
React jsReact js

What's hot (20)

Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
Api presentation
Api presentationApi presentation
Api presentation
 
Mobile phone applications
Mobile phone applicationsMobile phone applications
Mobile phone applications
 
Json
JsonJson
Json
 
Selenium Presentation at Engineering Colleges
Selenium Presentation at Engineering CollegesSelenium Presentation at Engineering Colleges
Selenium Presentation at Engineering Colleges
 
Setting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation FrameworkSetting up Page Object Model in Automation Framework
Setting up Page Object Model in Automation Framework
 
The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!The Benefits of Using React JS for Web Development!
The Benefits of Using React JS for Web Development!
 
Introduction to xcode
Introduction to xcodeIntroduction to xcode
Introduction to xcode
 
Exception handling
Exception handlingException handling
Exception handling
 
java mini project for college students
java mini project for college students java mini project for college students
java mini project for college students
 
React workshop presentation
React workshop presentationReact workshop presentation
React workshop presentation
 
Selenium- A Software Testing Tool
Selenium- A Software Testing ToolSelenium- A Software Testing Tool
Selenium- A Software Testing Tool
 
Google Assistant - Why? How?
Google Assistant - Why? How?Google Assistant - Why? How?
Google Assistant - Why? How?
 
Basics and different xml files used in android
Basics and different xml files used in androidBasics and different xml files used in android
Basics and different xml files used in android
 
React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
 
Android Navigation Component
Android Navigation ComponentAndroid Navigation Component
Android Navigation Component
 
Selenium
SeleniumSelenium
Selenium
 
Swagger
SwaggerSwagger
Swagger
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
React js
React jsReact js
React js
 

Similar to Joget Workflow v6 Training Slides - 17 - Building Plugins

Joget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow v5 Training Slides - Module 17 - Building PluginsJoget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow v5 Training Slides - Module 18 - Integrating with External SystemJoget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow
 
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow v6 Training Slides - 19 - Doing More with your Process DesignJoget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow
 
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 4 - Localizing your Joget WorkflowJoget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow
 
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin ArchitectureJoget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow
 
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash VariablesJoget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow
 
Joget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow v6 Training Slides - 21 - Userview KeyJoget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow v5 Training Slides - Module 9 - Hash variableJoget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow
 
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow v4 Training - Module 15 - Introduction to Plugin ArchitectureJoget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow
 
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow
 
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow v6 Training Slides - 8 - Designing your First UserviewJoget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow
 
Writing Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWriting Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWSO2
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial IntroPamela Fox
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connections Developers
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
Ryan Baxter
 
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow v6 Training Slides - 2 - Setting Up Joget WorkflowJoget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow
 
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow v5 Training Slides - Module 20 - Basic System AdministrationJoget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow
 

Similar to Joget Workflow v6 Training Slides - 17 - Building Plugins (20)

Joget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow v5 Training Slides - Module 17 - Building PluginsJoget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow v5 Training Slides - Module 17 - Building Plugins
 
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow v5 Training Slides - Module 18 - Integrating with External SystemJoget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
 
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
 
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow v6 Training Slides - 19 - Doing More with your Process DesignJoget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
 
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 4 - Localizing your Joget WorkflowJoget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
 
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin ArchitectureJoget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
 
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash VariablesJoget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
 
Joget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow v6 Training Slides - 21 - Userview KeyJoget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow v6 Training Slides - 21 - Userview Key
 
Joget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow v5 Training Slides - Module 9 - Hash variableJoget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow v5 Training Slides - Module 9 - Hash variable
 
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
 
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow v4 Training - Module 15 - Introduction to Plugin ArchitectureJoget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
 
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
 
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow v6 Training Slides - 8 - Designing your First UserviewJoget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
 
Writing Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget ServerWriting Gadgets with the WSO2 Gadget Server
Writing Gadgets with the WSO2 Gadget Server
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocialIBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
IBM Connect 2014 - JMP103: Extending Your Application Arsenal With OpenSocial
 
JMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocialJMP103 : Extending Your App Arsenal With OpenSocial
JMP103 : Extending Your App Arsenal With OpenSocial
 
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow v6 Training Slides - 2 - Setting Up Joget WorkflowJoget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
 
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
 
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow v5 Training Slides - Module 20 - Basic System AdministrationJoget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
 

More from Joget Workflow

Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow v6 Training Slides - 22 - Best Practices on Application BuildingJoget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow
 
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System AdministrationJoget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow
 
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow v6 Training Slides - 14 - Introduction to ReportingJoget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow
 
Joget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow v6 Training Slides - 12 - Version ControlJoget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow
 
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow v6 Training Slides - 11 - SLA and DeadlinesJoget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow
 
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow
 
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow v6 Training Slides - 7 - Designing your First DatalistJoget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow
 
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow v6 Training Slides - 6 - Using your First Process ToolJoget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow
 
Joget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow v6 Training Slides - 5 - Designing your First FormJoget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow
 
Joget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow v6 Training Slides - 3 - Designing your First ProcessJoget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow
 
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow v6 Training Slides - 1 - Introduction to Joget WorkflowJoget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow v5 Training Slides - Module 21 - Userview KeyJoget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting
Joget Workflow v5 Training Slides -  Module 14 - Introduction to reportingJoget Workflow v5 Training Slides -  Module 14 - Introduction to reporting
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting
Joget Workflow
 
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
Joget Workflow
 

More from Joget Workflow (16)

Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow v6 Training Slides - 22 - Best Practices on Application BuildingJoget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
 
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System AdministrationJoget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 20 - Basic System Administration
 
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development EnvironmentJoget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
 
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow v6 Training Slides - 14 - Introduction to ReportingJoget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
 
Joget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow v6 Training Slides - 12 - Version ControlJoget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow v6 Training Slides - 12 - Version Control
 
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow v6 Training Slides - 11 - SLA and DeadlinesJoget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
 
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
 
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow v6 Training Slides - 7 - Designing your First DatalistJoget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
 
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow v6 Training Slides - 6 - Using your First Process ToolJoget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
 
Joget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow v6 Training Slides - 5 - Designing your First FormJoget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow v6 Training Slides - 5 - Designing your First Form
 
Joget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow v6 Training Slides - 3 - Designing your First ProcessJoget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow v6 Training Slides - 3 - Designing your First Process
 
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow v6 Training Slides - 1 - Introduction to Joget WorkflowJoget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
 
Joget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow v5 Training Slides - Module 21 - Userview KeyJoget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow v5 Training Slides - Module 21 - Userview Key
 
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
 
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting
Joget Workflow v5 Training Slides -  Module 14 - Introduction to reportingJoget Workflow v5 Training Slides -  Module 14 - Introduction to reporting
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting
 
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
Joget Workflow v5 Training Slides - Module 13 - Improving your form design an...
 

Recently uploaded

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
Globus
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
Roshan Dwivedi
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 

Recently uploaded (20)

Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024Globus Compute Introduction - GlobusWorld 2024
Globus Compute Introduction - GlobusWorld 2024
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Vitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdfVitthal Shirke Java Microservices Resume.pdf
Vitthal Shirke Java Microservices Resume.pdf
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Launch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in MinutesLaunch Your Streaming Platforms in Minutes
Launch Your Streaming Platforms in Minutes
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 

Joget Workflow v6 Training Slides - 17 - Building Plugins

  • 1. All Rights Reserved © Joget Inc Joget Workflow v6 Building Plugins http://facebook.com/jogetworkflow http://twitter.com/jogetworkflow Last Revised on Oct 2018
  • 2. All Rights Reserved © Joget Inc Prerequisites 1. Basic web application development knowledge. 2. Java web application programming knowledge. 3. Understanding on Joget Workflow plugin architecture and plugin types.
  • 3. All Rights Reserved © Joget Inc Content 1. Introduction 2. Creating a Process Tool Plugin 3. Creating a Userview Theme Plugin 4. Creating a Form Field Element Plugin
  • 4. All Rights Reserved © Joget Inc Chapter 1 Introduction
  • 5. All Rights Reserved © Joget Inc Introduction • In this module, we will be learning on how to create:- – Process Tool / Post Form Submission Processing plugin – Userview plugin – Form Field Element plugin
  • 6. All Rights Reserved © Joget Inc Plugin Types
  • 7. All Rights Reserved © Joget Inc Each plugin is different • Before you embark on your journey to build a new plugin, be sure to:- – Each plugin may be implemented and configured (very) differently. – Check out existing implementation of the kind of plugin. – Extend the necessary classes for each implementation.
  • 8. All Rights Reserved © Joget Inc Plugin Abstract Classes and Interface • Deadline Plugins extends org.joget.workflow.model.DefaultDeadlinePlugin • Process Participant Plugins extends org.joget.workflow.model.DefaultParticipantPlugin • Process Tool / Post Form Submission Processing Plugins extends org.joget.plugin.base.DefaultApplicationPlugin • Form Field Element Plugins extends org.joget.apps.form.model.Element implements org.joget.apps.form.model.FormBuilderPaletteElement
  • 9. All Rights Reserved © Joget Inc Plugin Abstract Classes and Interface • Form Load Binder Plugins extends org.joget.apps.form.model.FormBinder implements org.joget.apps.form.model.FormLoadBinder, org.joget.apps.form.model.FormLoadElementBinder • Form Options Binder Plugins extends org.joget.apps.form.model.FormBinder implements org.joget.apps.form.model.FormLoadOptionsBinder • Form Store Binder Plugins extends org.joget.apps.form.model.FormBinder implements org.joget.apps.form.model.FormStoreBinder, org.joget.apps.form.model.FormStoreElementBinder
  • 10. All Rights Reserved © Joget Inc Plugin Abstract Classes and Interface • Form Validator Plugins extends org.joget.apps.form.model.FormValidator • Datalist Action Plugins extends org.joget.apps.datalist.model.DataListActionDefault • Datalist Binder Plugins extends org.joget.apps.datalist.model.DataListBinderDefault • Datalist Column Formatter Plugins extends org.joget.apps.datalist.model.DataListColumnFormatDefault • Userview Menu Plugins extends org.joget.apps.userview.model.UserviewMenu
  • 11. All Rights Reserved © Joget Inc Plugin Abstract Classes and Interface • Userview Permission Plugins extends org.joget.apps.userview.model.UserviewPermission • Userview Theme Plugins extends org.joget.apps.userview.model.UserviewTheme • Audit Trail Plugins extends org.joget.plugin.base.DefaultAuditTrailPlugin • Hash Variable Plugins extends org.joget.apps.app.model.DefaultHashVariablePlugin • Directory Manager Plugins extends org.joget.plugin.base.ExtDefaultPlugin implements org.joget.directory.model.service.DirectoryManagerPlugin, org.joget.plugin.property.model.PropertyEditable
  • 12. All Rights Reserved © Joget Inc Introduction to Property Options • Each plugin uses the Property Options template scheme to provide an interface for app designer to configure the eventual plugin. • Reference: http://dev.joget.org/community/display/KBv6/Plugin+Properties+Options
  • 13. All Rights Reserved © Joget Inc Property Options - Email Tool
  • 14. All Rights Reserved © Joget Inc Property Options - Email Tool [ { "title": "@@app.emailtool.config@@", "properties": [ { "name": "toSpecific", "label": "@@app.emailtool.toEmail@@", "type": "textfield" }, { "name": "toParticipantId", "label": "@@app.emailtool.toPid@@", "type": "textfield" }, { "name": "cc", "label": "@@app.emailtool.cc@@", "type": "textfield" }, https://github.com/jogetworkflow/jw-community/blob/6.0- SNAPSHOT/wflow-core/src/main/resources/properties/app/emailTool.json
  • 15. All Rights Reserved © Joget Inc Property Options • JSON format [ { title : 'Page Title', properties : [ { name : 'Property Name', label : 'Property Label', description : 'Property Description', //optional, default is NULL type : 'Property Type', value : 'Property Value', //optional, default is null required : 'Mandatory or Not', //optional, 'true' or 'false', default is 'false' //… more attributes … }, //… more fields … ], validators : [ //optional //… properties custom validators … ], buttons : [ //optional //… custom properties page buttons … ] }, //… more properties page … ] TIP: Just search online for “JSON Beautifier” to properly indent and format your JSON definitiion.
  • 16. All Rights Reserved © Joget Inc Property Options Types • From V4 – Check Box– CheckBox – Element Select Box – ElementSelect – Grid – Grid – Hidden Field– Hidden – HTML Editor– HtmlEditor – Multi Select Box– MultiSelect – Password Field – Password – Radio Button – Radio – Readonly Text Field– Readonly – Select Box– SelectBox – Text Area – TextArea – Text Field – TextField
  • 17. All Rights Reserved © Joget Inc Property Options Types • New in V5 – Code Editor – CodeEditor – Combine Grid – GridCombine – Fixed Row Grid – GridFixedRow – Header – Header – Label – Label
  • 18. All Rights Reserved © Joget Inc Property Options Types • New in V6 – File – File – Image – Image Please refer to https://dev.joget.org/community/display/KBv6/Plugin+Properties+Options latest documentation.
  • 19. All Rights Reserved © Joget Inc Common Attributes for All Property Options Type except Hidden Field and Grid { name : ‘Property Name’, label : ‘Property Label’, description : ‘Property Description’, //optional, default is NULL type : ‘readonly’, value : ‘Property Value’, //optional , default is empty string required : ‘true’, //optional, boolean value, default is false }
  • 20. All Rights Reserved © Joget Inc Extra Attributes for Text Field, Password Field, Text Area and HTML Editor { size : ‘50’, //optional , integer value, default is NULL, only for text field and password field maxlength : ‘50’, //optional, integer value, default is NULL, only for text field and password field rows : ‘50’, //optional, integer value, default is NULL, only for text area and html editor cols : ‘50’, //optional, integer value, default is NULL , only for text area and html editor regex_validation : ‘^[a-zA-Z0-9_]+$’, //optional, default is NULL validation_message : ‘Error!!’ //optional, default is NULL }
  • 21. All Rights Reserved © Joget Inc Extra Attributes for Checkbox, Radio Button, Select Box and Multi Select Box { size : ‘10’, //optional, integer value, default is 4, only for multi select box options : [ //is optional to use this attribute or options_ajax {value: ‘value1’, label : ‘Value 1’}, {value: ‘value2’, label : ‘Value 2’}, {value: ‘value3’, label : ‘Value 3’} ], options_ajax_on_change : ‘property1’, //optional, value of this property name will passed over to load options from ajax, only for select box and multi select box options_ajax : ‘URL to load options JSON’ //optional, URL return JSON Array of a set of Objects that have value & label attribute }
  • 22. All Rights Reserved © Joget Inc Attributes for Hidden Field { name : ‘Property Name’, type : ‘hidden’, value : ‘Property Value’ }
  • 23. All Rights Reserved © Joget Inc Attributes for Grid { name : ‘Property Name’, label : ‘Property Label’, description : ‘Property Description’, //optional, default is NULL type : ‘grid’, columns : [ // 2 type of column, with and without options attribute {key : ‘col1’, label : ‘Col 1’}, {key : ‘col2’, label : ‘Col 2’, options:[ {value :‘option1’, label : ‘Option 1’}, {value :‘option2’, label : ‘Option 2’} ] }, ] value : [ //optional, default is NULL {col1 : ‘abc’, col2 : ‘option1’}, {col1 : ‘def’, col2 : ‘option2’} ], required : ‘true’, //optional, boolean value, default is false }
  • 24. All Rights Reserved © Joget Inc Extra Attributes for Element Select Field { options_ajax_on_change : ‘property1’, //optional, value of this property name will passover to load options from ajax options_ajax : ‘[CONTEXT_PATH]/web/property/json/getElements?classname= org.joget.apps.form.model.FormLoadElementBinder’, //Load plugin list based on class name given url : ‘[CONTEXT_PATH]/web/property/json/getPropertyOptions’ //Load plugin properties }
  • 25. All Rights Reserved © Joget Inc Property Validator Types • Currently only one validator type supported - AJAX { type : ‘AJAX’, url : ‘URL to validate properties page value’ , // All properties in the same page will send to this url to validate, URL return a JSON Object with status (success or fail) & message (JSONArray of String) attribute default_error_message : ‘Error in this page!!’ //optional, default is null }
  • 26. All Rights Reserved © Joget Inc Internationalization Support • You may localise your plugin.
  • 27. All Rights Reserved © Joget Inc 1. In the getPropertyOptions() method of your plugin, make reference to the message key properties file Example: 1. Create the corresponding file (e.g. formDataUpdateTool.properties) in “src/main/resources/messages” folder. Internationalization Support return AppUtil.readPluginResource(getClass().getName(), "/properties/formDataUpdateTool.json", null, true, "/messages/formDataUpdateTool");
  • 28. All Rights Reserved © Joget Inc Common Plugin Utility Methods • Get a bean from application context DirectoryManager dm = (DirectoryManager) AppUtil.getApplicationContext().getBean(“directoryManager”); • Read a resource file as String from resources folder String resource = AppUtil.readPluginResource(getClass().getName(), "/properties/plugin.json", new String[]{“value 1”, “value 2”}, true, "message/pluginResouseBundle"); Bean Name Argument used for String.format() Remove new line char Plugin Class NamePath to resource file in resources folderPath to message bundle in resources folder, without .properties file extension
  • 29. All Rights Reserved © Joget Inc Common Plugin Utility Methods • Processing Hash Variable to a String content = AppUtil.processHashVariable(content, workflowAssignment, StringUtil.TYPE_REGEX, replaceMap); • Get a i18n message from message bundle String message = AppPluginUtil.getMessage(“Label”, getClass().getName(), "message/pluginResouseBundle") Content to be process Workflow Assignment ObjectString escape type, TYPE_REGEX, TYPE_JSON or null A map contains Strings to be replace Path to message bundle in resources folder, without .properties file extension Message Key Plugin Class Name
  • 30. All Rights Reserved © Joget Inc Common Plugin Utility Methods • Get parameter name of Form Element String param = FormUtil.getElementParameterName(this); • Get value of Form Element String value = FormUtil.getElementPropertyValue(this, formData);
  • 31. All Rights Reserved © Joget Inc Common Plugin Utility Methods • More at http://dev.joget.org/community/pages/viewpage.action?pageId=19103970
  • 32. All Rights Reserved © Joget Inc Plugin Web Support • Provides an interface that enables you to implement your Web Service in a plugin. • How to invoke/call? – URL Pattern • {Context Path}/web/json/plugin/{Plugin Class Name}/service • Example: http://localhost:8080/jw/web/json/plugin/org.joget.sample.lib.SimpleFor mElement/service?say_something=Hello World – URL Pattern • {Context Path}/web/json/app/{App Id}/{App Version}/plugin/{Plugin Class Name}/service • Example: http://localhost:8080/jw/web/json/app/crm/1/plugin/org.joget.sample.lib .SimpleFormElement/service?say_something=Hello World
  • 33. All Rights Reserved © Joget Inc Plugin Web Support • implements org.joget.plugin.base.PluginWebSupport • Implement webService method • Example: public void webService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { //get request parameter String param = request.getParameter("param"); //print json response JSONArray jsonArray = new JSONArray(); Map<String, String> option1 = new HashMap<String, String>(); option1.put("value", "value1"); option1.put("label", "Value 1"); jsonArray.put(option1); Map<String, String> option2 = new HashMap<String, String>(); option2.put("value", "value2"); option2.put("label", "Value 2"); jsonArray.put(option2); jsonArray.write(response.getWriter()); }
  • 34. All Rights Reserved © Joget Inc Plugin Web Support • Add the following dependency into your pom.xml file. • Read more at https://dev.joget.org/community/display/KBv6/Web+Service+Plugin <dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> </dependency>
  • 35. All Rights Reserved © Joget Inc Chapter 2 Creating a Process Tool Plugin
  • 36. All Rights Reserved © Joget Inc Building Your First Plugin • No, we are not going to build a “Hello World” • Build a simple tool to update form data in a process • Scenario:
  • 37. All Rights Reserved © Joget Inc Simple Form Data Update Tool 1. Create a Maven project. 2. Open the maven project in NetBeans. 3. Create a class and extend DefaultApplicationPlugin abstract class. 4. Implement all the standard plugin method. 5. Register plugin class in Activator class. 6. Decide the property options for the plugin. 7. Implement execute method to update form data.
  • 38. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven project for your plugin. • For Windows: 1. Create a directory to contain your plugins. (E.g. “C:joget-projects”) 2. In Command Prompt, navigate to the newly created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample sample- plugin-pack 6.0-SNAPSHOT” 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information • For Linux: 1. Create a directory at home directory to contain your plugins. (E.g. “~joget-projects”) 2. In Command Terminal, go to the created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample sample- plugin-pack 6.0-SNAPSHOT 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
  • 39. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows C:joget-projects>“C:jw-communitybranches6.0-SNAPSHOTwflow-plugin-archetypecreate-plugin.bat" org.joget.sample sample-plugin-pack 6.0-SNAPSHOT [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2). [WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere. Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml Downloading: http://dev.joget.org/archiva/repository/snapshots2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven- metadata.xml
  • 40. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows [INFO] Using property: groupId = org.joget.sample [INFO] Using property: artifactId = sample-plugin-pack Define value for property 'version': 1.0-SNAPSHOT: : 6.0-SNAPSHOT [INFO] Using property: package = org.joget.sample Confirm properties configuration: groupId: org.joget.sample artifactId: sample-plugin-pack version: 6.0-SNAPSHOT package: org.joget.sample Y: : Y [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin- archetype:6.0-SNAPSHOT [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.joget.sample [INFO] Parameter: packageName, Value: org.joget.sample [INFO] Parameter: package, Value: org.joget.sample [INFO] Parameter: artifactId, Value: sample-plugin-pack [INFO] Parameter: version, Value: 6.0-SNAPSHOT [INFO] project created from Old (1.x) Archetype in dir: C:joget-projectssample-plugin-pack [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------
  • 41. All Rights Reserved © Joget Inc What is Inside The Maven Project • Open the newly created project in your IDE (i.e. Netbeans).
  • 42. All Rights Reserved © Joget Inc What is Inside The Maven Project • pom.xml – POM stands for "Project Object Model“, an XML representation of a Maven project – Used to manage your plugin dependencies jar • Activator.java – Bundle Activator for OSGi framework – The activator class is the bundle's hook to the lifecycle layer for management. – Used to register your plugin class in start method
  • 43. All Rights Reserved © Joget Inc Creating a Plugin Class 1. In your Maven project, create a plugin class call “SimpleFormDataUpdateTool”. 2. Extends org.joget.plugin.base.DefaultApplicationPlugin 3. Import required class file 4. Implement all abstract methods
  • 44. All Rights Reserved © Joget Inc Standard Plugin Methods public String getClassName() { return getClass().getName(); //plugin class name, MUST be the exact class name of the plugin } public String getName() { return "Plugin Name"; //Unique indentifier of plugin, override plugin with same name, used to display in Manage Plugin } public String getDescription() { return "Plugin Description"; //Used to display in Manage Plugin } public String getVersion() { return “1.0.0"; //Plugin Version, used to display in Manage Plugin } public String getLabel() { return "Plugin Label"; //Short Label, used to display in plugin select box } public String getPropertyOptions() { return ""; //Plugin property options, in JSON format }
  • 45. All Rights Reserved © Joget Inc Update Plugin Information public String getName() { return “Simple Form Data Update Tool"; } public String getVersion() { return “1.0.0"; } public String getDescription() { return “Update form data in a Process."; } public String getLabel() { return “Simple Form Data Update Tool"; } public String getClassName() { return getClass().getName(); } public String getPropertyOptions() { return ""; }
  • 46. All Rights Reserved © Joget Inc Register Your Plugin Class 1. Open Activator.java 2. Add the code below to start method //Register plugin here registrationList.add(context.registerService(SimpleFormDataUpdateTool.class.getName(), new SimpleFormDataUpdateTool(), null));
  • 47. All Rights Reserved © Joget Inc Decide Your Plugin Property Options • What kind of information needed from user? – Which form to update? – Which record in the form data? – Which fields to modify? – What is the value need to set to the particular field?
  • 48. All Rights Reserved © Joget Inc Decide Your Plugin Property Options • What kind of information needed from user? – Q: Which form to update? A: a select box with all available form listed – Q: Which record in the form data? A: Use process’s record id if not specify (in the grid) – Q: Which fields to modify? A: A grid with all the field ids and it’s value to update – Q: What is the value need to set to the particular field? A: Answer as above
  • 49. All Rights Reserved © Joget Inc Create Your Plugin Properties 1. In your Maven project, right and create new folder 2. Key in “src/main/resources/properties” and press Finish 3. Under “Other Sources” > “src/main/resources” > “properties”, create a new Empty File named “simpleFormDataUpdateTool.json” 4. Put the following code in your public String getPropertyOptions() method 1. Construct your plugin properties in “simpleFormDataUpdateTool.json”. return AppUtil.readPluginResource(getClass().getName(), "/properties/simpleFormDataUpdateTool.json", null, true, null);
  • 50. All Rights Reserved © Joget Inc formDataUpdateTool.json [{ title : 'Configure Simple Form Data Update Tool', properties : [{ name : 'formDefId', label : 'Form', type : 'SelectBox', options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options', required : 'true' },{ name : 'fields', label : 'Update Fields', type : 'Grid', columns : [{ key : 'field', label : 'Field Id' }, { key : 'value', label : 'Value' }], required : 'true' }] }]
  • 51. All Rights Reserved © Joget Inc Implement Execute Method 1. Get FormDefId from properties 2. Get record Id from process 3. Check whether record Id is configured to different value in properties grid 4. Load the original Form Data record 5. Set the updated fields and it’s value to the loaded data 6. Store the updated data
  • 52. All Rights Reserved © Joget Inc Implement Execute Method //Get FormDefId from properties String formDefId = (String) props.get("formDefId"); //Get record Id from process WorkflowAssignment wfAssignment = (WorkflowAssignment) props.get("workflowAssignment"); AppService appService = (AppService) AppUtil.getApplicationContext().getBean("appService"); String id = appService.getOriginProcessId(wfAssignment.getProcessId()); //Check whether record Id is configured to different value in properties grid Object[] fields = (Object[]) props.get("fields"); for (Object o : fields) { Map mapping = (HashMap) o; String fieldName = mapping.get("field").toString(); if (FormUtil.PROPERTY_ID.equals(fieldName)) { String fieldValue = mapping.get("value").toString(); id = fieldValue; break; } }
  • 53. All Rights Reserved © Joget Inc Implement Execute Method //Load the original Form Data record AppDefinition appDef = (AppDefinition) props.get("appDef"); FormRow row = new FormRow(); FormRowSet rowSet = appService.loadFormData(appDef.getAppId(), appDef.getVersion().toString(), formDefId, id); if (!rowSet.isEmpty()) { row = rowSet.get(0); } //Set the updated fields and it’s value to the loaded data for (Object o : fields) { Map mapping = (HashMap) o; String fieldName = mapping.get("field").toString(); String fieldValue = mapping.get("value").toString(); row.setProperty(fieldName, fieldValue); } //Store the updated data rowSet.set(0, row); appService.storeFormData(appDef.getAppId(), appDef.getVersion().toString(), formDefId, rowSet, id); return null;
  • 54. All Rights Reserved © Joget Inc 1. In your Maven project, right and create new folder 2. Key in “src/main/resources/messages” and press Finish 3. Under “Other Sources” > “src/main/resources” > “messages”, create a new Properties File (eg “simpleFormDataUpdateTool.properties”) 4. Modify code in your public String getPropertyOptions() method i18n your Plugin Properties return AppUtil.readPluginResource(getClass().getName(), "/properties/simpleFormDataUpdateTool.json", null, true, "/messages/simpleFormDataUpdateTool"); 5. Modify label to key in your plugin properties file. 6. Create keys and messages in your simpleFormDataUpdateTool.properties file.
  • 55. All Rights Reserved © Joget Inc New simpleFormDataUpdateTool.json with message key [{ title : '@@sfdut.config@@', properties : [{ name : 'formDefId', label : '@@sfdut.form@@', type : 'selectbox', options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options', required : 'true' },{ name : 'fields', label : '@@sfdut.fields@@', type : 'grid', columns : [{ key : 'field', label : '@@sfdut.fieldId@@' }, { key : 'value', label : '@@sfdut.value@@' }], required : 'true' }] }]
  • 56. All Rights Reserved © Joget Inc [{ title : '@@sfdut.config@@', properties : [{ name : 'formDefId', label : '@@sfdut.form@@', type : 'selectbox', options_ajax : '[CONTEXT_PATH]/web/json/console/app[APP_PATH]/forms/options', required : 'true' },{ name : 'fields', label : '@@sfdut.fields@@', type : 'grid', columns : [{ key : 'field', label : '@@sfdut.fieldId@@' }, { key : 'value', label : '@@sfdut.value@@' }], required : 'true' }] }] simpleFormDataUpdateTool.properties sfdut.config=Configure Simple Form Data Update Tool sfdut.form=Form sfdut.fields=Update Fields sfdut.fieldId=Field Id sfdut.value=Value
  • 57. All Rights Reserved © Joget Inc Build and upload • When you are ready, build the project by running the following command in your project path. • Obtain the .jar file generated and upload into Joget Workflow. mvn clean install
  • 58. All Rights Reserved © Joget Inc Test and Run Your Plugin App Designer’s view • Map the plugin to one of your “Tool” to a process. Process flow - Activity > Tool > Activity OR • Map the plugin to a form’s post form processing.
  • 59. All Rights Reserved © Joget Inc Process flow - Activity > Tool > Activity App Designer’s view End user assignment view End user assignment view
  • 60. All Rights Reserved © Joget Inc Process flow - Activity > Tool > Activity App Designer’s view End user assignment view End user assignment view • After form submitted, process tool will trigger the plugin, and when viewing the form again, value is updated.
  • 61. All Rights Reserved © Joget Inc Exercise • Did you notice that this plugin is very similar to “Form Data Update Tool” plugin already available in your copy of Joget Workflow?
  • 62. All Rights Reserved © Joget Inc Exercise • Compare it with our current plugin. • Try to create a drop down list of fields based on the form selected in dropdown above.
  • 63. All Rights Reserved © Joget Inc Materials • Completed project files can be obtained at 17-2-sample-plugin-pack.zip
  • 64. All Rights Reserved © Joget Inc Chapter Review • Be able to prepare a new Maven project. • Be able to build a plugin and run it in Joget.
  • 65. All Rights Reserved © Joget Inc Chapter 3 Creating a Userview Theme Plugin
  • 66. All Rights Reserved © Joget Inc Creating a Userview Theme Plugin • Study the existing implementation of other existing Userview Themes. – Open “DefaultTheme.java” – Locate relevant files that made up of the plugin. @Override public String getCss() { String css = AppUtil.readPluginResource(getClassName(), "/resources/themes/default/default.css"); css += getPropertyString("css"); css = css.replaceAll("@@contextPath@@", getRequestParameterString("contextPath")); return css; } public String getPropertyOptions() { return AppUtil.readPluginResource(getClass().getName(), "/properties/userview/defaultTheme.json", null, true, "message/userview/defaultTheme"); }
  • 67. All Rights Reserved © Joget Inc Study the file structure
  • 68. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven project for your plugin. • For Windows: 1. Create a directory to contain your plugins. (E.g. “C:joget-projects”) 2. In Command Prompt, navigate to the newly created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample theme- plugin-pack 6.0-SNAPSHOT” 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information • For Linux: 1. Create a directory at home directory to contain your plugins. (E.g. “~joget-projects”) 2. In Command Terminal, go to the created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample theme- plugin-pack 6.0-SNAPSHOT 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
  • 69. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows C:joget-projects>C:jw-communitytrunkwflow-plugin-archetypecreate-plugin.bat org.joget.sample theme-pack 6.0- SNAPSHOT [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2). [WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere. Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml Downloading: http://repo1.maven.org/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
  • 70. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows [INFO] Using property: groupId = org.joget.sample [INFO] Using property: artifactId = theme-pack Define value for property 'version': 1.0-SNAPSHOT: 6.0-SNAPSHOT [INFO] Using property: package = org.joget.sample Confirm properties configuration: groupId: org.joget.sample artifactId: theme-pack version: 6.0-SNAPSHOT package: org.joget.sample Y: : Y [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:6.0-SNAPSHOT [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.joget.sample [INFO] Parameter: packageName, Value: org.joget.sample [INFO] Parameter: package, Value: org.joget.sample [INFO] Parameter: artifactId, Value: theme-pack [INFO] Parameter: version, Value: 6.0-SNAPSHOT [INFO] project created from Old (1.x) Archetype in dir: C:joget-projectstheme-pack [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
  • 71. All Rights Reserved © Joget Inc What is Inside The Maven Project • Open the newly created project in your IDE (i.e. Netbeans).
  • 72. All Rights Reserved © Joget Inc What is Inside The Maven Project • pom.xml – POM stands for "Project Object Model“, an XML representation of a Maven project – Used to manage your plugin dependencies jar • Activator.java – Bundle Activator for OSGi framework – The activator class is the bundle's hook to the lifecycle layer for management. – Used to register your plugin class in start method
  • 73. All Rights Reserved © Joget Inc Creating a Plugin Class 1. In your Maven project, create a plugin class call “EnhancedTheme”. 2. Extends UserviewTheme 3. Import required class file 4. Implement all abstract methods
  • 74. All Rights Reserved © Joget Inc Register Your Plugin Class 1. Open Activator.java 2. Add the code below to start method //Register plugin here registrationList.add(context.registerService(EnhancedTheme.class.ge tName(), new EnhancedTheme(), null));
  • 75. All Rights Reserved © Joget Inc Implementing the methods • You may copy the existing implementations of DefaultTheme. • Replace where applicable. public String getCss() { String css = AppUtil.readPluginResource(getClassName(), "/resources/themes/enhanced/enhanced.css"); public String getName() { return "Enhanced Theme"; public String getPropertyOptions() { return AppUtil.readPluginResource(getClass().getName(), "/properties/userview/enhancedTheme.json", null, true, "/messages/userview/enhancedTheme"); } public String getLabel() { return "Enhanced Theme";
  • 76. All Rights Reserved © Joget Inc Creating the supporting files • resources/themes/enhanced/enhanced.css • resources/themes/enhanced/header.png • properties/userview/enhancedTheme.json • messages/userview/enhancedTheme.properties
  • 77. All Rights Reserved © Joget Inc Get Creative • Get Creative! Create your theme accordingly by tweaking the CSS. • You may also add in your own scripting if required.
  • 78. All Rights Reserved © Joget Inc Build and upload • When you are ready, build the project by running the following command in your project path. • Obtain the .jar file generated and upload into Joget Workflow. mvn clean install
  • 79. All Rights Reserved © Joget Inc Build and upload • Test out the theme in an actual Userview. • Repeat as many times as needed too until you achieve what you want.
  • 80. All Rights Reserved © Joget Inc Original Theme
  • 81. All Rights Reserved © Joget Inc New Theme
  • 82. All Rights Reserved © Joget Inc Exercise • Try to modify the CSS or Javascript to change its background.
  • 83. All Rights Reserved © Joget Inc Exercise
  • 84. All Rights Reserved © Joget Inc Materials • You may obtain project source code of the sample new theme showcased in this chapter from the file 17-3-theme-pack.zip • Modified theme with rotating background available from the file 17-3-theme-pack-background.zip
  • 85. All Rights Reserved © Joget Inc Chapter Review • Be able to create a Userview Theme plugin.
  • 86. All Rights Reserved © Joget Inc Chapter 4 Creating a Form Field Element Plugin
  • 87. All Rights Reserved © Joget Inc What are we going to build? • We are going to build a Form Field Element that works very similarly like a Text Field but… – By incorporating the use of a jQuery plugin that automatically formats currency and numbers as you type on form inputs. – Reference: http://www.decorplanit.com/plugin/
  • 88. All Rights Reserved © Joget Inc Creating a Form Field Element Plugin • Study the existing implementation of other existing form field elements. – Open “TextField.java”, locate relevant files that made up of the plugin. @Override public String getPropertyOptions() { ... return AppUtil.readPluginResource(getClass().getName(), "/properties/form/textField.json", new Object[]{encryption}, true, "message/form/TextField"); } @Override public String getFormBuilderIcon() { return "/plugin/org.joget.apps.form.lib.TextField/images/textField_icon.gif"; } @Override public String renderTemplate(FormData formData, Map dataModel) { String template = "textField.ftl";
  • 89. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Using Joget Workflow subproject “wflow-plugin-archetype” to create a Maven project for your plugin. • For Windows: 1. Create a directory to contain your plugins. (E.g. “C:joget-projects”) 2. In Command Prompt, navigate to the newly created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample currency- pack 6.0-SNAPSHOT” 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information • For Linux: 1. Create a directory at home directory to contain your plugins. (E.g. “~joget-projects”) 2. In Command Terminal, go to the created directory. 3. Run “…wflow-plugin-archetypecreate-plugin.bat" org.joget.sample currency- pack 6.0-SNAPSHOT 4. Key in “6.0-SNAPSHOT” for version and “y” to confirm all the information
  • 90. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows C:joget-projects>C:jw-communitytrunkwflow-plugin-archetypecreate-plugin.bat org.joget.sample currency-pack 6.0- SNAPSHOT [INFO] Scanning for projects... [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode [WARNING] Archetype not found in any catalog. Falling back to central repository (http://repo1.maven.org/maven2). [WARNING] Use -DarchetypeRepository=<your repository> if archetype's repository is elsewhere. Downloading: http://repo1.maven.org/maven2/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml Downloading: http://repo1.maven.org/org/joget/wflow-plugin-archetype/6.0-SNAPSHOT/maven-metadata.xml
  • 91. All Rights Reserved © Joget Inc Creating a Maven Project for Your Plugin • Windows [INFO] Using property: groupId = org.joget.sample [INFO] Using property: artifactId = currency-pack Define value for property 'version': 1.0-SNAPSHOT: 6.0-SNAPSHOT [INFO] Using property: package = org.joget.sample Confirm properties configuration: groupId: org.joget.sample artifactId: currency-pack version: 6.0-SNAPSHOT package: org.joget.sample Y: : Y [INFO] ---------------------------------------------------------------------------- [INFO] Using following parameters for creating project from Old (1.x) Archetype: wflow-plugin-archetype:6.0-SNAPSHOT [INFO] ---------------------------------------------------------------------------- [INFO] Parameter: groupId, Value: org.joget.sample [INFO] Parameter: packageName, Value: org.joget.sample [INFO] Parameter: package, Value: org.joget.sample [INFO] Parameter: artifactId, Value: currency-pack [INFO] Parameter: version, Value: 6.0-SNAPSHOT [INFO] project created from Old (1.x) Archetype in dir: C:joget-projectscurrency-pack [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS
  • 92. All Rights Reserved © Joget Inc What is Inside The Maven Project • Open the newly created project in your IDE (i.e. Netbeans).
  • 93. All Rights Reserved © Joget Inc What is Inside The Maven Project • pom.xml – POM stands for "Project Object Model“, an XML representation of a Maven project – Used to manage your plugin dependencies jar • Activator.java – Bundle Activator for OSGi framework – The activator class is the bundle's hook to the lifecycle layer for management. – Used to register your plugin class in start method
  • 94. All Rights Reserved © Joget Inc Creating a Plugin Class 1. In your Maven project, create a plugin class call “CurrencyField”. 2. Extends Element implements FormBuilderPaletteElement 3. Import required class file 4. Implement all abstract methods
  • 95. All Rights Reserved © Joget Inc Register Your Plugin Class 1. Open Activator.java 2. Add the code below to start method //Register plugin here registrationList.add(context.registerService(CurrencyField.class.getName(), new CurrencyField(), null));
  • 96. All Rights Reserved © Joget Inc Implementing the methods • You may copy the existing implementations of TextField. • Replace where applicable.
  • 97. All Rights Reserved © Joget Inc Property Options
  • 98. All Rights Reserved © Joget Inc Property Options
  • 99. All Rights Reserved © Joget Inc Creating the supporting files • resources/message/form/currencyField.properties • resources/properties/form/currencyField.json • resources/resources/images/currencyField_icon.gif • resources/resources/js/autoNumeric.js • resources/templates/currencyField.ftl
  • 100. All Rights Reserved © Joget Inc Build and upload • When you are ready, build the project by running the following command in your project path. • Obtain the .jar file generated and upload into Joget Workflow. mvn clean install
  • 101. All Rights Reserved © Joget Inc Build and upload • Test out the form element field in actual Form. • Repeat as many times as needed too until you achieve what you want.
  • 102. All Rights Reserved © Joget Inc Materials • You may obtain project source code of the sample new theme showcased in this chapter from the file 17-4-currency-pack.zip
  • 103. All Rights Reserved © Joget Inc Chapter Review • Be able to create a Form Field Element plugin.
  • 104. All Rights Reserved © Joget Inc Module Review 1. Introduction 2. Creating a Process Tool Plugin 3. Creating a Userview Theme Plugin 4. Creating a Form Field Element Plugin
  • 105. All Rights Reserved © Joget Inc Recommended Further Learning • Study on how other plugin types are implemented. – Check out the Joget Marketplace at http://marketplace.joget.org/ – Check out the Joget Knowledge Base – Developer Guide https://dev.joget.org/community/display/KBv6/Developing+Plugins
  • 106. All Rights Reserved © Joget Inc Stay Connected with Joget Workflow • http://www.joget.org • http://community.joget.org • http://twitter.com/jogetworkflow • http://facebook.com/jogetworkflow • http://youtube.com/jogetworkflow • http://slideshare.net/joget