Users may wonder on what is the state of their submitted process applications. We are going to attempt to address this issue by creating a list that will show the application information together with the pending activity and the pending user. This way, the requesters/users would be able to tell on the state of their applications/process instances.
In this exercise, we are using the HR Expenses Claim App that is bundled together in the Joget Enterprise edition with MySQL as the database.
Figure 1: Viewing submitted application through Datalist
By default, users would be able to see the submitted applications by going through the "Personal Expenses" listing but one will not be able to tell what is the next activity in line and who is supposed to attend to it. This can be solved by creating a new Datalist.
Create a new Datalist.
Choose JDBC Datalist Database Binder.
In "Configure JDBC Datalist Database Binder", choose "Default Datasource" in "Datasource".
Apply the following query in "SQL SELECT Query"
Note: Please replace the code "app_fd_hr_expense_claim" with your own table name if you intend to use it for other application.
Set "Primary Key" to "a.id"
Figure 2: Adding the columns into the Datalist
Next, add in the columns intended, and most importantly, add "activityName" and "assignee" to reveal the pending activity and assignees.
Figure 3: Datalist showing the pending activity and assignees
The Datalist will now list all the pending activities of everyone. Next, we are going filter the list such that user will only see what they submitted.
Figure 4: Retrieving the requester information
We may determine on who is the claimant by looking up the "claimant" field.
In the Datalist's "SQL SELECT Query", modify the code to the following:-
This is the new code added in.
With the changes made above, we will now be able to list down the records related to the currently logged in user.
Figure 5: Filtered List of Pending Activity and Assignee
The following query is for MSSQL to use.