Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a list of hash variables offered by Joget:

  • Workflow Assignment Hash Variable
  • Workflow Process Hash Variable
  • Current User Hash Variable
  • Date Hash Variable
  • Environment Variable Hash Variable
  • App Variable Hash Variable
  • Form Data Hash Variable
  • Form Binder Hash Variable
  • App Definition Hash Variable
  • App Message Hash Variable (Internationalization)
  • Performer Hash Variable
  • Request Parameter Hash Variable
  • User Hash Variable
  • Userview Key Hash Variable
  • Workflow Variable Hash Variable
  • Request Hash Variable
  • Platform Hash Variable
  • Users Hash Variable
  • Bean Shell Hash Variable
  • Datalist Hash Variable
  • Expression Hash Variable
  • Report Builder Hash Variable
  • Code Builder Hash Variable

This list categorizes the types of Hash Variables that can be utilized within Joget DX for various purposes, such as accessing specific data, internationalizing applications, managing user information, and more. Each type of Hash Variable serves a specific function in retrieving and displaying data dynamically within the Joget application platform.

As can be understood, a hash variable is not to be confused with a workflow variable. Workflow variables CAN be 'extracted' or used as a hash variable for dynamic purposes as mentioned in the list (Workflow Assignment Hash Variable & Workflow Process Hash Variable).

Populate Data dynamically

Accessing Data for Email Tools: For functionalities like populating an email body, both form data (accessed via # form.table.status #) and workflow variables (# variable.status #) can be utilized, offering flexibility in how data is referenced within the workflow.

Please do keep in mind that it is important to not confuse the form data with workflow variables. As explained before, they are separate entities but both entities can be used as hash variables for use inside, for example, an email body.

Update Mechanisms

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. Often times, this will come inbuilt with your joget version.

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 toolIf your goal is to match the form data variable with the workflow variable, it is necessary to use both the plugins mentioned above otherwise it will not synchronize properly if both of these tools are not used together.

Besides the Workflow Variable Update plugin, 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.

...

While workflow variables are essential for process routing, other elements like form data and hash variables can also be used for similar purposes. For example, using a form hash variable in a transition condition ((# form.f1.TextField # === "true")) is a viable alternative. Both form hash and workflow hash will work. For exampleApart from routing, a workflow hash can also be used within the application for dynamic data referencing, such as in custom scripts or email bodies, where they can be called upon using syntax like like # variable.status #.

A key feature of workflow variables is their ability to create an audit trail. As the process progresses, every change in the value of a workflow variable is recorded. This provides a detailed history of how the process has evolved over time, which is essential for review and monitoring purposes. This tracking ability enhances transparency and accountability in the workflow. By having a clear record of all changes, administrators and users can understand the decision-making process and the flow of activities more comprehensively.

...

The decision to use workflow variables, form data, or hash variables depends on the specific needs of the process. For simpler decision-making where an audit trail is not critical, form data or hash variables might suffice. However, for complex processes where tracking the history of decisions is important, workflow variables become indispensable.

Dynamic Data Utilization

Storage mechanisms for form data variables and workflow variables

Workflow variables and form data in Joget serve different purposes but can be interconnected for efficient process management. Workflow variables are primarily used within the process flow. They are crucial for decision-making and guiding the direction of the workflow. Unlike form data, which is directly inputted by users into forms and inherently visible, workflow variables operate in the background and are not automatically displayed in forms or datalists.

The storage and display of workflow variables pose certain challenges. These variables are stored in the "shkactivitydata" database table. Displaying them in a datalist typically requires an SQL JOIN with this table. However, this can lead to performance issues, particularly in large-scale applications. For example, a process with numerous variables and activities can result in a substantial number of records in the database, escalating rapidly with the number of transactions. This increase in data can significantly impact the performance of datalists. For example, if your process has 10 workflow variables and 10 activities, the total records stored in the DB table is 100 records, and if the total number of process transactions reaches 1,000, you will generate 100,000 records in the "shkactivitydata" table for just one process. If the combined total of processes in all your Joget app is 100 processes, this table will grow to 10 million.

As a best practice, it's recommended to map workflow variables to form fields. This mapping ensures the values of workflow variables are 'copied' to corresponding form fields at each activity, making them visible and accessible for later viewing in forms and datalists. This approach avoids the direct querying of the large "shkactivitydata" table, thereby optimizing performance.Apart from routing, workflow variables are versatile in their application.