Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Table of Contents |
---|
The Lazy Approval Tool Plugin is designed for effortless assignment approval using a URL. In this article, we will examine a sample application that sends a URL via email. The recipient of the email can then approve or reject the assignment by clicking on the URL provided in the email.
...
This plugin source code is available in JogetOSS repository at https://github.com/jogetoss/lazy-approval-tool
...
.
Plugins Available in the Bundle:
Lazy Approval Tool
This plugin bundle is compatible with Joget DX 8.
The user is able to approve or reject the assignment outside of Joget App. By utilising the email tool to send email with the URL, the user is able to click on the URL to perform assignment approval or rejection.
Figure 1: SMTP Settings
Refer to Sign in with app passwords to generate the password for SMTP Gmail.
For more details, please refer to General Settings > SMTP Settings.
To ensure the successful operation of this plugin, it is essential to whitelist the domains or IP addresses of the host. Typically, this involves adding the IP address or domain name of your Joget application server to the whitelist. To access this section of Joget, go to Settings → General Settings and scroll down till you see API Domain/IP Whitelist section. (IMPORTANT NOTE: If this is not set, you will get a 400 Forbidden error when clicking on approve/reject)
Figure 2: API Domain/IP Whitelist
Name | Description |
---|---|
API Domain Whitelist (Separated by ';') | Domain whitelist to allow API calls to Joget Workflow. Separated by semicolon. Example "localhost;www.joget.org;dev.joget.org”, or "*" to allow from everywhere. In a production environment, do not use "*". Doing so will allow anyone to call all JSON APIs from the Joget server. |
API IP Whitelist (Separated by ';') | IP address whitelist to allow API calls to Joget. Separated by semicolon. Example "localhost; 192.168.101.10; www.joget.org;dev.joget.org ”, or "*" to allow from everywhere. In a production environment, do not use "*". Doing so will allow anyone to call all JSON APIs from the Joget server. |
1. You can obtain the jar file by the latest release at https://github.com/jogetoss/lazy-approval-tool/releases.
2. Upload the plugin jar file in Joget by going to Settings → Manage Plugins.
3. You can choose to import the demo app or create the app from scratch.
1. Download the demo app from Download Demo App.
2. Go to Joget Home or All Apps and click on Import App to import the downloaded demo app.
1.
In this section, we will examine what the app does and how it does it.
The first part of the app is the form. This form gathers the user's name and email address. Inside the form, we also have hidden fields that keep track of the approval status. We'll get into how these hidden fields work when we talk about the processes. After that, we'll shoot out an email asking the user to either say yes or no to the assignment.
Figure
...
3: Sample App Form
2. The second part of the sample app is the process. The process is where the Lazy Approval Tool is configured, to see how to configure the tool, check out Lazy Approval Tool Properties. The process starts off by prompting the user to submit the form, once the form has been submitted, the process will be triggered and an email will be sent to the user
...
.
Below shows the different process of single activity and multiple activity respectively.
Figure 4: Process of Sample App (Single Activity)
Figure 5: Process of Sample App (Multiple Activity)
3. Now you can create a UI to show the process and an Inbox list to show the process list.
Figure 6: UI Builder
1. To test on single activity, go to "Run Process Approval (Single Activity)" form and fill it. Make sure the approver has configured an email address in the "Users" section.
Figure 7: Process for Single Activity
2. In "Process List", you will see that a process is running.
Figure 8: Process List with a running process
3. Check your email, you will receive an email for the selected approver's email.
Figure 9: Email received
4. Click on the email and click on "Approve" or "Reject".
Figure 10: Email to Approve or Reject Assignment
5. You will be directed to a page saying assignment completed with all the details. After that, you can close the window.
Figure 11: Redirected to message page
6. After that, go back to the app and see the "Process List". The assignment just now has been completed.
Figure 12: Process List with no process
7. There will be an email saying assignment approved.
Figure 13: Email with Assignment Approved
1. You can also click on the approval link and perform assignment in Incognito Mode, meaning that your Joget App does not have to be signed in to perform the task. Therefore, the assignee that the URL is sent to is important not to be shared out to unauthorised users.
Figure 14: Lazy Approval Tool Configuration
Name | Description |
---|---|
Form * | The form of the process. |
Process * | The process value to generate the lazy approval link. |
Activity * | The activity value to generate the lazy approval link. |
Assignee (Participant ID) | The assignee who is allowed to perform the lazy approval process. |
Workflow Variable (Status) | The workflow variable that defines the approve or reject status. |
...
Figure 2: Email Sent
After accepting or rejecting the assignment, a page will be redirected and the following message will be shown.
Figure 3: Redirected page with message
There will be another email sent to the user notifying them of their decision.
Figure 4: Email of the Notification
This is how the overall process looks like and how it works for single activity and multiple activity respectively.
Figure 5: Process of Sample App (Single Activity)
Figure 6: Process of Sample App (Multiple Activity)
This is what the configuration of the Lazy Approval Tool looks like in the process.
Figure 7: Lazy Approval Tool Configuration
If you would like to download the sample app and try out the tool for yourself, please note that you have to:
...