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 4 Next »

Let's say we want to change workflow variables directly inside a system tool activity without having to create a complex beanshell script. The Process Tool Plugin assigns a simple expression to a workflow variable. The expression is evaluated using a beanshell interpreter, and the resulting value is converted into a string. The workflow variable is then assigned to that string value.

All workflow variables are directly accessible inside the expression, but note that all Joget Workflow variables are of the string type.

Usage Scenario:

  1. Set a workflow variable to a constant value.  Use AssignVariablePlugin as a tool.  Use the parameters workflow variable name : A,  expression : 0.
  2. To increment a workflow variable value, use AssignVariablePlugin as a tool.  Use the parameters workflow variable name : A, expression : Integer.parseInt(A) + 1.
  3. To decrement a workflow variable value : use AssignVariablePlugin as a tool. Use the parameters workflow variable name : A, expression : Integer.parseInt(A) - 1.

Steps in Creating a Plugin: 

Create an empty project folder. Inside this folder, create subdirectory src\main\java\myplugin.

Create the following text files :

src\main\java\myplugin\AssignVariablePlugin.java

pom.xml :

Build Step:

Installation :

Login to Joget Workflow as admin, choose System Settings>Manage Plugins>Upload Plugin, then browse to the target directory of the project folder. Upload the project snapshot jar that is generated by the previous maven execution.

  • No labels