Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Workflow variables in Joget are key data elements that are essential for the overall operation and flow of a process. Unlike data specific to individual forms or activities, workflow variables have a broader scope and are used throughout the entire process.
For example, consider a Leave Application process. When an employee fills out a leave application form, they provide details such as the date of application, the duration of the leave, and the reason for the leave. This type of data is specific to that particular form. These details are critical for record-keeping and for informing the decision-makers (like supervisors) about the leave request. However, they typically serve only within the scope of that form and are used for informational purposes rather than driving the process flow. This form-specific data is usually stored associated with that particular leave application instance. It can be accessed and reviewed by relevant parties, such as HR personnel or supervisors, to understand the specifics of the leave request.
Workflow variables, on the other hand, are elements that carry significant weight in determining the flow of the process. In the Leave Application process, a good example of a workflow variable could be "supervisorApproval". This variable might store a value like "approved" or "rejected". The value of this variable is used to decide the next steps in the workflow. For example, if "supervisorApproval" is "approved", the process might move to the HR department for final processing. If it's "rejected", the process might end or return to the employee for further action. The key here is that the workflow variable directly influences the overall process flow. It's not just a piece of information, but a driver for decisions and actions within the workflow.
This variable becomes crucial when a supervisor's decision (accept or reject) alters the course of the workflow, triggering different activities or decisions.
Purpose and Usage: Form fields in Joget are primarily designed for user input and data display within a specific form. They are the interface elements that users interact with, such as text boxes, dropdowns, or date pickers.
Scope: The data entered or displayed in form fields is specific to that form instance. It's used for capturing and displaying information relevant to a single step or part of the process.
Storage: Data from form fields is typically stored in the application's database and is associated with the specific instance of the form. It's accessible whenever the form is loaded or referenced.
Their primary role is to facilitate decision-making and condition handling within the workflow in the process builder.
Scope: Unlike form fields, workflow variables have a process-wide scope. They maintain their values across different forms and activities in a workflow, making them ideal for passing data between steps in a process.
Influence on Process Flow: Workflow variables are often used to control process routing, conditions, and decision points within a workflow. Their values can determine which path a process takes, or which activities are triggered next.
In Joget, a form field and a workflow variable, even if named similarly (e.g., both called "status"), are distinct entities. A form field is specific to a form and is used to capture user input, while a workflow variable is a broader process-level variable that can influence and guide the workflow's progression and routes taken. So in this case, the 'status' variable are also stored in different database tables.
Hash Variable is a special hash-escaped keyword that can be used in (but NOT limited to)...–Form Builder–List Builder–UI Builder–Supported plugin configuration properties–Activity name in Process Builder–External Form URL when mapping an activity to an external form...to return the value of useful runtime variables from the (App) Variables.
In Joget, a Hash Variable is a specialized, hash-escaped keyword that has a wide range of applications across different components of the platform. It can be used in the Form Builder, List Builder, and UI Builder to dynamically retrieve and display the values of runtime variables. Beyond these builders, Hash Variables are also utilized in configuring properties for supported plugins, naming activities within the Process Builder, and specifying external form URLs when mapping activities to external forms. This versatile functionality allows Hash Variables to effectively pull and display relevant runtime information from the application's variables, enhancing the dynamic interaction and responsiveness of the application to real-time data changes.
Form Data Update Tool: This plugin is used to update values directly in the database. The changes made using this tool affect the data stored in form fields. It is an efficient way to ensure that the data entered or modified in form fields is accurately reflected in the database.
Workflow Variable Update Tool: Available at the marketplace, the Workflow Variable Update Tool updates the value of workflow variables. It's used when there's a need to modify the values of variables that control or influence the workflow process.
Besides this tool, BeanShell scripting can also be used to update workflow variables. BeanShell is a lightweight scripting language that offers a flexible way to write scripts for various purposes, including updating workflow variables. While BeanShell scripting provides a powerful and flexible way to manage workflow variables, the Workflow Variable Update Tool is often preferred for its user-friendliness and ease of use, especially for users who might not be comfortable with scripting.