Thanks for joining us on November 27-29, 2018 at the Gartner Application Strategies & Solutions Summit 2018 in Las Vegas, USA.
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.
- Set a workflow variable to a constant value. Use AssignVariablePlugin as a tool. Use the parameters workflow variable name : A, expression : 0.
- To increment a workflow variable value, use AssignVariablePlugin as a tool. Use the parameters workflow variable name : A, expression : Integer.parseInt(A) + 1.
- 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 :
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 was generated by the previous maven execution.