SlideShare a Scribd company logo
All Rights Reserved © Joget Inc
Joget Workflow v4
Hash Variable
http://facebook.com/jogetworkflow
http://twitter.com/jogetworkflow
Last Revised on March 2015Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Prerequisites
• General understanding on how to design an App using the
Joget platform (i.e. Process, Form, Datalist, Userview).
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Content
1. Introduction to Hash Variable
2. List of Hash Variable and its usages
3. Nested Hash Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 1
Introduction to Hash Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
What is Hash Variable?
• Hash Variable != Workflow Variable
• Hash Variable is a special hash-escaped keyword that can be
used in
– Form Builder
– Datalist Builder
– Userview Builder
– Supported plugin configuration properties
– Activity name in Workflow Designer
– External Form URL when mapping an activity to an external form
to return value of some useful runtime variables from
Workflow Engine
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Hash Variable
• Each Hash Variable element has its own prefix. Eg.:
– #date.D-MMM-yyyy#
– #form.leave_applications.name#
– #variable.status#
– #i18n.smtpServer#
• A new Hash Variable (with it’s own unique prefix) can be
built through Joget’s plugin architecture.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Plugin Types
Joget Workflow
Form
Builder
Datalist
Builder
Workflow
Engine
Userview
Builder
- APP -
Form Builder
• Form Element
• Form Permission
• Form Load Binder
• Form Options Binder
• Form Store Binder
• Form Validator
Workflow Engine
• Deadline
• Process Participant
• Process Tool
Datalist Builder
• Datalist Action
• Datalist Binder
• Datalist Column
Formatter
• Datalist Filter Type
Userview Builder
• Userview Menu
• Userview Permission
• Userview Theme
App Level
• Audit Trail
• Hash Variable
System Level
• Directory Manager
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter Review
• Brief understanding on the purpose that Hash Variable
serves.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 2
List of Hash Variables and its
usages
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Ever Wonder…
• How to display requestor’s full name in a form?
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Ever Wonder…
• How to display requestor’s full name in task / activity
name?
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
List of Hash variables
• Performer
• Internationalization
• Request Parameter
• Environment Variable
• Current User
• User
• Assignment
• Form
• Workflow Variable
• Date
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Performer Hash Variable
• Performer
– To get user information of the performer of an activity.
• #performer.activityDefId.id#,
• #performer.activityDefId.username#,
• #performer.activityDefId.firstName#,
• #performer.activityDefId.lastName#,
• #performer.activityDefId.email#,
• #performer.activityDefId.active#,
• #performer.activityDefId.timeZone#
• Reference:
http://dev.joget.org/community/display/KBv4/Performer+Hash+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #performer Hash Variable
#performer.facilities_request.username#
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #performer Hash Variable in
Form Builder
Joget Inc Internal Use Only
Hash Variable can be used
in Form Title, Section Title,
Form Element
All Rights Reserved © Joget Inc
Using #performer Hash Variable in
Workflow Designer
Joget Inc Internal Use Only
#performer.leave_approval_act1.username#
All Rights Reserved © Joget Inc
Using #performer Hash Variable in
Plugin Configuration
Joget Inc Internal Use Only
In Email Plugin, Hash
Variables are supported in
From, To (specific email
address), CC, Subject and
Message fields.
All Rights Reserved © Joget Inc
Internationalization Hash Variable
• Internationalization support on application
– Support language localization on application level.
• #i18n.keyName#
• Reference:
http://dev.joget.org/community/display/KBv4/Internationalization+Hash
+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #i18n in Userview Builder
• The #i18n Hash Variable retrieves values from the
Message set of the App.
• E.g. Message with key app.hello in 2 locales (en_US,
zh_CN)
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #i18n in Userview Builder
• With the key defined, the hash variable can be used in the
Userview Builder to dynamically show corresponding value
depending on the user’s locale.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Request Parameter Hash Variable
• Request Parameter
– For accessing request parameters.
• #requestParam.parameterName#
• Reference:
http://dev.joget.org/community/display/KBv4/Request+Parameters+Hash
+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #requestParam in Form Builder
• Useful to prepopulate form
field
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Environment Variable Hash Variable
• Environment Variable
– Application level environment variable is typically used to store
common or re-usable values such as Email server settings.
• #envVariable.keyName#
• Reference:
http://dev.joget.org/community/display/KBv4/Environment+Variable+Has
h+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #envVariable in Email Tool
• Use Environment Variable on Email Tool to ease
maintenance.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Current User Hash Variable
• Current User
– Retrieve currently logged in user information.
• #currentUser.id#,
• #currentUser.username#,
• #currentUser.firstName#,
• #currentUser.lastName#,
• #currentUser.email#,
• #currentUser.active#,
• #currentUser.timeZone#
• Reference:
http://dev.joget.org/community/display/KBv4/Current+User+Hash+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #currentUser on Form Builder
• Prepopulate applicant’s name in Form
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
User Hash Variable
• User
– To get user information based on username.
• #user.username.id#
• #user.username.username#
• #user.username.firstName#
• #user.username.lastName#
• #user.username.email#
• #user.username.active#
• #user.username.timeZone#
• Reference:
http://dev.joget.org/community/display/KBv4/User+Hash+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #user Hash Variables
• To get user information based on the username:
– #user.username.id#
– #user.username.username#
– #user.username.firstName#
– #user.username.lastName#
– #user.username.email#
– #user.username.active#
– #user.username.timeZone#
Example:
#user.admin.email#
#user.cat.firstName#
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Assignment Hash Variable
• Assignment
– To get workflow activity information of the current assignment.
• #assignment.processId#,
• #assignment.processDefId#,
• #assignment.processName#,
• #assignment.processVersion#,
• #assignment.processRequesterId#,
• #assignment.description#,
• #assignment.activityId#,
• #assignment.activityName#,
• #assignment.activityDefId#,
• #assignment.assigneeId#
• Reference:
http://dev.joget.org/community/display/KBv4/Assignment+Hash+Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #assignment on Form Builder
• Retrieve current assignment information.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Form Hash Variable
• Form
– To get data from form table.
– #form.formDataTableName.fieldId#
– For examples:
• #form.registration.registeredDate#
• #form.registration.issuedDate#
• #form.registration.issuedDate[0001]#
– To retrieve the field value by specifying a specific record primary key value.
• #form.registration.registeredDate[{variable.recordId}]# //using nested
Hash Variable with curly bracket.
– To achieve the same result like the previous point but by making reference
to another Hash Variable for its record primary key value.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #form in Email Tool / Plugin
Configuration
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Workflow Variable Hash Variable
• Workflow Variable
– To get the value of a workflow variable.
• #variable.variableName#
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #variable Hash Variable
• To get the value of a workflow variable:
– #variable.variableName#
Joget Inc Internal Use Only
Example: #variable.status#
All Rights Reserved © Joget Inc
Date Hash Variable
• Date
– To get date time according to a specified format.
– For examples:
• #date.h:mm a# // 12:08 PM #date.EEE, d MMM yyyy h:mm:ss a# // Wed,
4 Jul 2009 12:08:56 PM
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #date Hash Variables
• To get date time according to a specified format:
– #date.javaSimpleDateFormat# (refer to
http://download.oracle.com/javase/6/docs/api/java/text/Simpl
eDateFormat.html for SimpleDateFormat)
– #date.[DAY/MONTH/YEAR][+/-
]IntegerValue.javaSimpleDateFormat#
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #date Hash Variables
• Example: #date.EEE, d MMM yyyy h:mm:ss a#
• Sample Output: Mon, 28 Dec 2009 11:27:26 AM
Java SimpleDateFormat
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #date Hash Variables
• Example: #date.DAY+7.EEE, d MMM yyyy h:mm:ss a#
• Sample Output: Mon, 4 Jan 2010 11:27:26 AM
Java SimpleDateFormat+7 days
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #date Hash Variables
• Example: #date.MONTH-2.EEE, d MMM yyyy h:mm:ss a#
• Sample Output: Wed, 28 Oct 2009 11:27:26 AM
Java SimpleDateFormat-2 months
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Using #date Hash Variables
• Example: #date.YEAR+1.EEE, d MMM yyyy h:mm:ss a#
• Sample Output: Tue, 28 Dec 2010 11:27:26 AM
Java SimpleDateFormat+1 year
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter 3
Nested Hash Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Nested Hash Variable
• Hash Variable can be used inside another Hash Variable
to form a Nested Hash Variable.
• The syntax for the inner and subsequent Hash Variables is
wrapped by a pair of curly bracket '{' and '}' instead of the
usual paif of #.
• Example: #prefix.{prefix.variableKey}#
• There is no limit to the depth of the nested variable.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Example of Nested Hash Variable
• #date.{envVariable.dateFormat}#
• #user.{variable.username}.firstName#
• #form.tableChild.field1[{form.tableParent.childId}]#
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Chapter Review
• Appreciate the flexibility and convenience brought by the
Hash Variable.
• Able to apply the Hash Variable feature into application
development.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Exercise
1. In “Submit Leave” form, pre-populate the applicant’s
name using hash variable.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Exercise
2. In “Send Rejected Email Notification” Email Tool,
compose the message as follow using hash variable. Go
through the process flow to send out the test email.
Dear [applicant name],
Your application has been [status] due to the following reason:-
[rejected reason]
Thank you.
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Exercise
3. In Inbox, instead of just showing “Approve Leave”,
include the applicant’s name to the example as follow:-
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Exercise
4. Create a new listing that will only show applications
submitted by the logged in user.
 Create a new Datalist
Add filter criteria in “Extra Filter Condition”.
– Eg. ( e.customProperties.name = 'Cat' )
– Replace ‘Cat’ with the appropriate Hash Variable
 Add the created list into the existing Userview
Reference: http://dev.joget.org/community/display/KBv4/Form+Data+Binder
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Exercise
5. Make use of Environment Variable to store commonly
used settings (e.g. Email configuration used in Email Tool
plugin.)
Reference:
http://dev.joget.org/community/display/KBv4/Environment+Variables
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Module Review
1. Introduction to Hash Variable
2. List of Hash Variable and its usages
3. Nested Hash Variable
Joget Inc Internal Use Only
All Rights Reserved © Joget Inc
Stay Connected with Joget Workflow
• www.joget.org
• community.joget.org
• twitter.com/jogetworkflow
• facebook.com/jogetworkflow
• youtube.com/jogetworkflow
• slideshare.net/joget
Joget Inc Internal Use Only

More Related Content

PPTX
Joget Workflow v6 Training Slides - 9 - Hash Variable
PPTX
Joget Workflow v6 Training Slides - 18 - Integrating with External System
PPTX
Joget Workflow v5 Training - Module 1 - Introduction to Joget Workflow
PDF
Rest API
PPTX
Java ee 8 + security overview
PDF
RxJS Operators - Real World Use Cases - AngularMix
PDF
Lets make a better react form
PPTX
Oracle eCommerce (ATG) Database Best Practices
Joget Workflow v6 Training Slides - 9 - Hash Variable
Joget Workflow v6 Training Slides - 18 - Integrating with External System
Joget Workflow v5 Training - Module 1 - Introduction to Joget Workflow
Rest API
Java ee 8 + security overview
RxJS Operators - Real World Use Cases - AngularMix
Lets make a better react form
Oracle eCommerce (ATG) Database Best Practices

What's hot (20)

PPTX
AUTOMATED QUESTION PAPER GENERATOR
PDF
Hands-On Java web passando por Servlets, JSP, JSTL, JDBC, Hibernate, DAO, MV...
PPTX
[Final] ReactJS presentation
PPTX
Its time to React.js
PDF
Criando e consumindo webservice REST com PHP e JSON
PDF
Developing Faster with Swagger
PDF
Presentation swagger
PPTX
What's an api
PPT
Java EE Introduction
PPTX
E-Examination
PDF
gRPC: The Story of Microservices at Square
PPTX
Governor limits
PPTX
PDF
APIs in a Microservice Architecture
PPTX
JavaScript Basics
PPTX
Introduction to React JS
PPT
Advanced Javascript
PDF
Swagger / Quick Start Guide
PPTX
Java socket programming
AUTOMATED QUESTION PAPER GENERATOR
Hands-On Java web passando por Servlets, JSP, JSTL, JDBC, Hibernate, DAO, MV...
[Final] ReactJS presentation
Its time to React.js
Criando e consumindo webservice REST com PHP e JSON
Developing Faster with Swagger
Presentation swagger
What's an api
Java EE Introduction
E-Examination
gRPC: The Story of Microservices at Square
Governor limits
APIs in a Microservice Architecture
JavaScript Basics
Introduction to React JS
Advanced Javascript
Swagger / Quick Start Guide
Java socket programming
Ad

Viewers also liked (17)

PPTX
Joget Workflow v4 Training - Module 11 - SLA and Deadlines
PDF
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
PPTX
Joget Workflow v4 Training - Module 8 - Designing your first Userview
PPTX
Joget Workflow v4 Training - Module 1 - Introduction to Joget
PPTX
Joget Workflow v4 Training - Module 4 - Localizing your Joget
PPTX
Joget Workflow v4 Training - Module 10 - Participant Mapping and Permission C...
PPTX
Joget Workflow v4 Training - Module 3 - Designing your First Process
PPTX
Joget Workflow v4 Training - Module 12 - Version Control
PPTX
Joget Workflow v4 Training - Module 2 - Setting up Joget Workflow
PPTX
Joget Workflow v4 Training - Module 5 - Designing your First Form
PPTX
Joget Workflow v4 Training - Module 6 - Using your First Process Tool - Email
PDF
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
PPTX
Joget Workflow v4 Training - Module 7 - Designing your first Datalist
PPTX
Joget Workflow v5 Training Slides - Module 11 - SLA and Deadlines
PPTX
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
PPTX
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
PPTX
Joget Workflow v5 Training Slides - Module 9 - Hash variable
Joget Workflow v4 Training - Module 11 - SLA and Deadlines
Joget Workflow Training – Basic & Advance for v3.1 – Module 10 – Hash Variables
Joget Workflow v4 Training - Module 8 - Designing your first Userview
Joget Workflow v4 Training - Module 1 - Introduction to Joget
Joget Workflow v4 Training - Module 4 - Localizing your Joget
Joget Workflow v4 Training - Module 10 - Participant Mapping and Permission C...
Joget Workflow v4 Training - Module 3 - Designing your First Process
Joget Workflow v4 Training - Module 12 - Version Control
Joget Workflow v4 Training - Module 2 - Setting up Joget Workflow
Joget Workflow v4 Training - Module 5 - Designing your First Form
Joget Workflow v4 Training - Module 6 - Using your First Process Tool - Email
Joget Workflow Training – Basic & Advance for v3.1 – Module 7 – Creating Data...
Joget Workflow v4 Training - Module 7 - Designing your first Datalist
Joget Workflow v5 Training Slides - Module 11 - SLA and Deadlines
Joget Workflow v5 Training Slides - Module 19 - Doing More With Your Process ...
Joget Workflow v5 Training Slides - Module 18 - Integrating with External System
Joget Workflow v5 Training Slides - Module 9 - Hash variable
Ad

Similar to Joget Workflow v4 Training - Module 9 - Hash Variable (20)

PPTX
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
PPTX
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
PDF
Joget Workflow Training – Basic & Advance for v3.1 – Module 5 – Creating your...
PPTX
Joget Workflow v5 Training Slides - Module 4 - Localizing your Joget Workflow
PPTX
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
PPTX
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
PPTX
Joget Workflow v6 Training Slides - 21 - Userview Key
PPTX
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
PPTX
Joget Workflow v5 Training Slides - Module 21 - Userview Key
PPTX
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
PPTX
Joget Workflow v5 Training Slides - Module 8 - Designing your first Userview
PPTX
Joget Workflow v5 Training Slides - Module 3 - Designing your first Process
PPTX
Joget Workflow v6 Training Slides - 5 - Designing your First Form
PPTX
Joget Workflow v5 Training Slides - Module 5 - Designing your First Form
PPTX
Joget Workflow v5 Training Slides - Module 17 - Building Plugins
PPTX
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
PPTX
Joget Workflow v6 Training Slides - 17 - Building Plugins
PDF
Joget Workflow Training – Basic & Advance for v3.1 – Module 8 – Participant M...
PPTX
Joget Workflow v5 Training Slides - Module 7 - Designing your first Datalist
PDF
Joget Workflow Training – Basic & Advance for v3.1 – Module 11 – A Revision -...
Joget Workflow v6 Training Slides - 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 8 - Designing your First Userview
Joget Workflow Training – Basic & Advance for v3.1 – Module 5 – Creating your...
Joget Workflow v5 Training Slides - Module 4 - Localizing your Joget Workflow
Joget Workflow v6 Training Slides - 19 - Doing More with your Process Design
Joget Workflow v5 Training Slides - Module 15 - Introduction to Plugin Archit...
Joget Workflow v6 Training Slides - 21 - Userview Key
Joget Workflow v4 Training - Module 15 - Introduction to Plugin Architecture
Joget Workflow v5 Training Slides - Module 21 - Userview Key
Joget Workflow v6 Training Slides - 15 - Introduction to Plugin Architecture
Joget Workflow v5 Training Slides - Module 8 - Designing your first Userview
Joget Workflow v5 Training Slides - Module 3 - Designing your first Process
Joget Workflow v6 Training Slides - 5 - Designing your First Form
Joget Workflow v5 Training Slides - Module 5 - Designing your First Form
Joget Workflow v5 Training Slides - Module 17 - Building Plugins
Joget Workflow v6 Training Slides - 7 - Designing your First Datalist
Joget Workflow v6 Training Slides - 17 - Building Plugins
Joget Workflow Training – Basic & Advance for v3.1 – Module 8 – Participant M...
Joget Workflow v5 Training Slides - Module 7 - Designing your first Datalist
Joget Workflow Training – Basic & Advance for v3.1 – Module 11 – A Revision -...

More from Joget Workflow (15)

PPTX
Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
PPTX
Joget Workflow v6 Training Slides - 20 - Basic System Administration
PPTX
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
PPTX
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
PPTX
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
PPTX
Joget Workflow v6 Training Slides - 12 - Version Control
PPTX
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
PPTX
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
PPTX
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
PPTX
Joget Workflow v6 Training Slides - 3 - Designing your First Process
PPTX
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
PPTX
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
PPTX
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
PPTX
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
PPTX
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting
Joget Workflow v6 Training Slides - 22 - Best Practices on Application Building
Joget Workflow v6 Training Slides - 20 - Basic System Administration
Joget Workflow v6 Training Slides - 16 - Preparing Development Environment
Joget Workflow v6 Training Slides - 14 - Introduction to Reporting
Joget Workflow v6 Training Slides - 13 - Improving your Form Design and Prese...
Joget Workflow v6 Training Slides - 12 - Version Control
Joget Workflow v6 Training Slides - 11 - SLA and Deadlines
Joget Workflow v6 Training Slides - 10 - Participant Mapping and Permission C...
Joget Workflow v6 Training Slides - 6 - Using your First Process Tool
Joget Workflow v6 Training Slides - 3 - Designing your First Process
Joget Workflow v6 Training Slides - 2 - Setting Up Joget Workflow
Joget Workflow v6 Training Slides - 1 - Introduction to Joget Workflow
Joget Workflow v5 Training Slides - Module 20 - Basic System Administration
Joget Workflow v5 Training Slides - Module 16 - Preparing Development Environ...
Joget Workflow v5 Training Slides - Module 14 - Introduction to reporting

Recently uploaded (20)

PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Nekopoi APK 2025 free lastest update
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
medical staffing services at VALiNTRY
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
ai tools demonstartion for schools and inter college
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Introduction to Artificial Intelligence
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Understanding Forklifts - TECH EHS Solution
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Odoo Companies in India – Driving Business Transformation.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
Nekopoi APK 2025 free lastest update
Design an Analysis of Algorithms II-SECS-1021-03
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
medical staffing services at VALiNTRY
Upgrade and Innovation Strategies for SAP ERP Customers
Softaken Excel to vCard Converter Software.pdf
L1 - Introduction to python Backend.pptx
Transform Your Business with a Software ERP System
How Creative Agencies Leverage Project Management Software.pdf
ai tools demonstartion for schools and inter college
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Introduction to Artificial Intelligence
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Understanding Forklifts - TECH EHS Solution
2025 Textile ERP Trends: SAP, Odoo & Oracle

Joget Workflow v4 Training - Module 9 - Hash Variable

  • 1. All Rights Reserved © Joget Inc Joget Workflow v4 Hash Variable http://facebook.com/jogetworkflow http://twitter.com/jogetworkflow Last Revised on March 2015Joget Inc Internal Use Only
  • 2. All Rights Reserved © Joget Inc Prerequisites • General understanding on how to design an App using the Joget platform (i.e. Process, Form, Datalist, Userview). Joget Inc Internal Use Only
  • 3. All Rights Reserved © Joget Inc Content 1. Introduction to Hash Variable 2. List of Hash Variable and its usages 3. Nested Hash Variable Joget Inc Internal Use Only
  • 4. All Rights Reserved © Joget Inc Chapter 1 Introduction to Hash Variable Joget Inc Internal Use Only
  • 5. All Rights Reserved © Joget Inc What is Hash Variable? • Hash Variable != Workflow Variable • Hash Variable is a special hash-escaped keyword that can be used in – Form Builder – Datalist Builder – Userview Builder – Supported plugin configuration properties – Activity name in Workflow Designer – External Form URL when mapping an activity to an external form to return value of some useful runtime variables from Workflow Engine Joget Inc Internal Use Only
  • 6. All Rights Reserved © Joget Inc Hash Variable • Each Hash Variable element has its own prefix. Eg.: – #date.D-MMM-yyyy# – #form.leave_applications.name# – #variable.status# – #i18n.smtpServer# • A new Hash Variable (with it’s own unique prefix) can be built through Joget’s plugin architecture. Joget Inc Internal Use Only
  • 7. All Rights Reserved © Joget Inc Plugin Types Joget Workflow Form Builder Datalist Builder Workflow Engine Userview Builder - APP - Form Builder • Form Element • Form Permission • Form Load Binder • Form Options Binder • Form Store Binder • Form Validator Workflow Engine • Deadline • Process Participant • Process Tool Datalist Builder • Datalist Action • Datalist Binder • Datalist Column Formatter • Datalist Filter Type Userview Builder • Userview Menu • Userview Permission • Userview Theme App Level • Audit Trail • Hash Variable System Level • Directory Manager Joget Inc Internal Use Only
  • 8. All Rights Reserved © Joget Inc Chapter Review • Brief understanding on the purpose that Hash Variable serves. Joget Inc Internal Use Only
  • 9. All Rights Reserved © Joget Inc Chapter 2 List of Hash Variables and its usages Joget Inc Internal Use Only
  • 10. All Rights Reserved © Joget Inc Ever Wonder… • How to display requestor’s full name in a form? Joget Inc Internal Use Only
  • 11. All Rights Reserved © Joget Inc Ever Wonder… • How to display requestor’s full name in task / activity name? Joget Inc Internal Use Only
  • 12. All Rights Reserved © Joget Inc List of Hash variables • Performer • Internationalization • Request Parameter • Environment Variable • Current User • User • Assignment • Form • Workflow Variable • Date Joget Inc Internal Use Only
  • 13. All Rights Reserved © Joget Inc Performer Hash Variable • Performer – To get user information of the performer of an activity. • #performer.activityDefId.id#, • #performer.activityDefId.username#, • #performer.activityDefId.firstName#, • #performer.activityDefId.lastName#, • #performer.activityDefId.email#, • #performer.activityDefId.active#, • #performer.activityDefId.timeZone# • Reference: http://dev.joget.org/community/display/KBv4/Performer+Hash+Variable Joget Inc Internal Use Only
  • 14. All Rights Reserved © Joget Inc Using #performer Hash Variable #performer.facilities_request.username# Joget Inc Internal Use Only
  • 15. All Rights Reserved © Joget Inc Using #performer Hash Variable in Form Builder Joget Inc Internal Use Only Hash Variable can be used in Form Title, Section Title, Form Element
  • 16. All Rights Reserved © Joget Inc Using #performer Hash Variable in Workflow Designer Joget Inc Internal Use Only #performer.leave_approval_act1.username#
  • 17. All Rights Reserved © Joget Inc Using #performer Hash Variable in Plugin Configuration Joget Inc Internal Use Only In Email Plugin, Hash Variables are supported in From, To (specific email address), CC, Subject and Message fields.
  • 18. All Rights Reserved © Joget Inc Internationalization Hash Variable • Internationalization support on application – Support language localization on application level. • #i18n.keyName# • Reference: http://dev.joget.org/community/display/KBv4/Internationalization+Hash +Variable Joget Inc Internal Use Only
  • 19. All Rights Reserved © Joget Inc Using #i18n in Userview Builder • The #i18n Hash Variable retrieves values from the Message set of the App. • E.g. Message with key app.hello in 2 locales (en_US, zh_CN) Joget Inc Internal Use Only
  • 20. All Rights Reserved © Joget Inc Using #i18n in Userview Builder • With the key defined, the hash variable can be used in the Userview Builder to dynamically show corresponding value depending on the user’s locale. Joget Inc Internal Use Only
  • 21. All Rights Reserved © Joget Inc Request Parameter Hash Variable • Request Parameter – For accessing request parameters. • #requestParam.parameterName# • Reference: http://dev.joget.org/community/display/KBv4/Request+Parameters+Hash +Variable Joget Inc Internal Use Only
  • 22. All Rights Reserved © Joget Inc Using #requestParam in Form Builder • Useful to prepopulate form field Joget Inc Internal Use Only
  • 23. All Rights Reserved © Joget Inc Environment Variable Hash Variable • Environment Variable – Application level environment variable is typically used to store common or re-usable values such as Email server settings. • #envVariable.keyName# • Reference: http://dev.joget.org/community/display/KBv4/Environment+Variable+Has h+Variable Joget Inc Internal Use Only
  • 24. All Rights Reserved © Joget Inc Using #envVariable in Email Tool • Use Environment Variable on Email Tool to ease maintenance. Joget Inc Internal Use Only
  • 25. All Rights Reserved © Joget Inc Current User Hash Variable • Current User – Retrieve currently logged in user information. • #currentUser.id#, • #currentUser.username#, • #currentUser.firstName#, • #currentUser.lastName#, • #currentUser.email#, • #currentUser.active#, • #currentUser.timeZone# • Reference: http://dev.joget.org/community/display/KBv4/Current+User+Hash+Variable Joget Inc Internal Use Only
  • 26. All Rights Reserved © Joget Inc Using #currentUser on Form Builder • Prepopulate applicant’s name in Form Joget Inc Internal Use Only
  • 27. All Rights Reserved © Joget Inc User Hash Variable • User – To get user information based on username. • #user.username.id# • #user.username.username# • #user.username.firstName# • #user.username.lastName# • #user.username.email# • #user.username.active# • #user.username.timeZone# • Reference: http://dev.joget.org/community/display/KBv4/User+Hash+Variable Joget Inc Internal Use Only
  • 28. All Rights Reserved © Joget Inc Using #user Hash Variables • To get user information based on the username: – #user.username.id# – #user.username.username# – #user.username.firstName# – #user.username.lastName# – #user.username.email# – #user.username.active# – #user.username.timeZone# Example: #user.admin.email# #user.cat.firstName# Joget Inc Internal Use Only
  • 29. All Rights Reserved © Joget Inc Assignment Hash Variable • Assignment – To get workflow activity information of the current assignment. • #assignment.processId#, • #assignment.processDefId#, • #assignment.processName#, • #assignment.processVersion#, • #assignment.processRequesterId#, • #assignment.description#, • #assignment.activityId#, • #assignment.activityName#, • #assignment.activityDefId#, • #assignment.assigneeId# • Reference: http://dev.joget.org/community/display/KBv4/Assignment+Hash+Variable Joget Inc Internal Use Only
  • 30. All Rights Reserved © Joget Inc Using #assignment on Form Builder • Retrieve current assignment information. Joget Inc Internal Use Only
  • 31. All Rights Reserved © Joget Inc Form Hash Variable • Form – To get data from form table. – #form.formDataTableName.fieldId# – For examples: • #form.registration.registeredDate# • #form.registration.issuedDate# • #form.registration.issuedDate[0001]# – To retrieve the field value by specifying a specific record primary key value. • #form.registration.registeredDate[{variable.recordId}]# //using nested Hash Variable with curly bracket. – To achieve the same result like the previous point but by making reference to another Hash Variable for its record primary key value. Joget Inc Internal Use Only
  • 32. All Rights Reserved © Joget Inc Using #form in Email Tool / Plugin Configuration Joget Inc Internal Use Only
  • 33. All Rights Reserved © Joget Inc Workflow Variable Hash Variable • Workflow Variable – To get the value of a workflow variable. • #variable.variableName# Joget Inc Internal Use Only
  • 34. All Rights Reserved © Joget Inc Using #variable Hash Variable • To get the value of a workflow variable: – #variable.variableName# Joget Inc Internal Use Only Example: #variable.status#
  • 35. All Rights Reserved © Joget Inc Date Hash Variable • Date – To get date time according to a specified format. – For examples: • #date.h:mm a# // 12:08 PM #date.EEE, d MMM yyyy h:mm:ss a# // Wed, 4 Jul 2009 12:08:56 PM Joget Inc Internal Use Only
  • 36. All Rights Reserved © Joget Inc Using #date Hash Variables • To get date time according to a specified format: – #date.javaSimpleDateFormat# (refer to http://download.oracle.com/javase/6/docs/api/java/text/Simpl eDateFormat.html for SimpleDateFormat) – #date.[DAY/MONTH/YEAR][+/- ]IntegerValue.javaSimpleDateFormat# Joget Inc Internal Use Only
  • 37. All Rights Reserved © Joget Inc Using #date Hash Variables • Example: #date.EEE, d MMM yyyy h:mm:ss a# • Sample Output: Mon, 28 Dec 2009 11:27:26 AM Java SimpleDateFormat Joget Inc Internal Use Only
  • 38. All Rights Reserved © Joget Inc Using #date Hash Variables • Example: #date.DAY+7.EEE, d MMM yyyy h:mm:ss a# • Sample Output: Mon, 4 Jan 2010 11:27:26 AM Java SimpleDateFormat+7 days Joget Inc Internal Use Only
  • 39. All Rights Reserved © Joget Inc Using #date Hash Variables • Example: #date.MONTH-2.EEE, d MMM yyyy h:mm:ss a# • Sample Output: Wed, 28 Oct 2009 11:27:26 AM Java SimpleDateFormat-2 months Joget Inc Internal Use Only
  • 40. All Rights Reserved © Joget Inc Using #date Hash Variables • Example: #date.YEAR+1.EEE, d MMM yyyy h:mm:ss a# • Sample Output: Tue, 28 Dec 2010 11:27:26 AM Java SimpleDateFormat+1 year Joget Inc Internal Use Only
  • 41. All Rights Reserved © Joget Inc Chapter 3 Nested Hash Variable Joget Inc Internal Use Only
  • 42. All Rights Reserved © Joget Inc Nested Hash Variable • Hash Variable can be used inside another Hash Variable to form a Nested Hash Variable. • The syntax for the inner and subsequent Hash Variables is wrapped by a pair of curly bracket '{' and '}' instead of the usual paif of #. • Example: #prefix.{prefix.variableKey}# • There is no limit to the depth of the nested variable. Joget Inc Internal Use Only
  • 43. All Rights Reserved © Joget Inc Example of Nested Hash Variable • #date.{envVariable.dateFormat}# • #user.{variable.username}.firstName# • #form.tableChild.field1[{form.tableParent.childId}]# Joget Inc Internal Use Only
  • 44. All Rights Reserved © Joget Inc Chapter Review • Appreciate the flexibility and convenience brought by the Hash Variable. • Able to apply the Hash Variable feature into application development. Joget Inc Internal Use Only
  • 45. All Rights Reserved © Joget Inc Exercise 1. In “Submit Leave” form, pre-populate the applicant’s name using hash variable. Joget Inc Internal Use Only
  • 46. All Rights Reserved © Joget Inc Exercise 2. In “Send Rejected Email Notification” Email Tool, compose the message as follow using hash variable. Go through the process flow to send out the test email. Dear [applicant name], Your application has been [status] due to the following reason:- [rejected reason] Thank you. Joget Inc Internal Use Only
  • 47. All Rights Reserved © Joget Inc Exercise 3. In Inbox, instead of just showing “Approve Leave”, include the applicant’s name to the example as follow:- Joget Inc Internal Use Only
  • 48. All Rights Reserved © Joget Inc Exercise 4. Create a new listing that will only show applications submitted by the logged in user.  Create a new Datalist Add filter criteria in “Extra Filter Condition”. – Eg. ( e.customProperties.name = 'Cat' ) – Replace ‘Cat’ with the appropriate Hash Variable  Add the created list into the existing Userview Reference: http://dev.joget.org/community/display/KBv4/Form+Data+Binder Joget Inc Internal Use Only
  • 49. All Rights Reserved © Joget Inc Exercise 5. Make use of Environment Variable to store commonly used settings (e.g. Email configuration used in Email Tool plugin.) Reference: http://dev.joget.org/community/display/KBv4/Environment+Variables Joget Inc Internal Use Only
  • 50. All Rights Reserved © Joget Inc Module Review 1. Introduction to Hash Variable 2. List of Hash Variable and its usages 3. Nested Hash Variable Joget Inc Internal Use Only
  • 51. All Rights Reserved © Joget Inc Stay Connected with Joget Workflow • www.joget.org • community.joget.org • twitter.com/jogetworkflow • facebook.com/jogetworkflow • youtube.com/jogetworkflow • slideshare.net/joget Joget Inc Internal Use Only