Joget DX Preview Release Available for Download

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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Plugin Type

  • Application
  • Form Variable
  • Participant
  • Activity Tool

What Is It For?

BeanShell is a small, embeddable Java source interpreter with object scripting language features, written in Java. BeanShell dynamically executes standard Java syntax. So, using BeanShell Plugin, you can type in valid Java codes in plugin configuration, and the statements will be executed when the plugin is triggered. No compilation cycle is needed.


1. Script

The script can be composed of:

  • Java syntax supported by the version of JDK used
  • Usage of the following libraries:
    • Libraries available in JDK
    • org.joget.workflow.model.*
    • org.joget.workflow.util.*
    • JavaBeans Activation Framework 1.1
    • Commons Email 1.1
    • JavaMail 1.4
    • MySQL JDBC Driver 3.1.14
    • Oracle JDBC Driver
    • Microsoft SQL Server JDBC Driver 1.0
  • Usage of Hash Variables


Set value to a workflow variable

Execute SQL statement through JDBC

Participant Type Plugin

A participant type plugin should return a collection of usernames. In the participant plugin there are two context variables available for the script to use  :

  • pluginManager
  • workflowActivity

A Beanshell Participant Type Plugin returning one Participant

Activity Tool Type Plugin

Activity tool type plugin is a plugin that will be executed when workflow reached a System Tool activity. System Tool activities must be placed in the workflow diagram, and then the Beanshell plugin configured in the Process's Activity Mapping for this to work.  In this plugin there are two context variables available for the script to use :

  • pluginManager
  • workflowAssignment

A Beanshell Activity Tool type plugin that sets a form data

Increment a workflow variable value

This beanshell script retrieves workflow variable 'ApprovalLevel', convert it into integer, add 1, and stores it back as the same workflow variable.

  • No labels