Versions Compared

Key

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

...

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 is also stored in different database tables.

Storage: Stored on a database table separate from the form data. These variables are stored in the "shkactivitydata" database table and are not to be tampered with for reasons mentioned below in the section (Storage mechanisms for form data variables and workflow variables).

Key Concepts

Hash 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.

...

A hash variable is not to be confused with a workflow variable. Workflow variables CAN can be 'extracted' or used as a hash variable for dynamic purposes (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.

...

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.If  If 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. Apart 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 # variable.status #.

...