🧭 Overview
In Joget, workflow tracking is essential for monitoring running or pending activities within business processes.
This implementation allows you to track workflow activities by their activity names (e.g., those containing "validate request") by joining Joget’s workflow tables.
The combination of SQL and DataList configuration provides an easy way to display:
- 🔢 Process IDs
- 🧾 Record IDs
- 👤 Pending Users
- ⚙️ Activity Details
⚙️ How It Works
Here’s the breakdown of how the query and DataList integration work together:
- 🧩 SHKAssignmentsTable stores assignment-level workflow information.
- 🔗 wf_process_link maps workflow process instances to their originating form records.
- ⚙️ The SQL
JOINretrieves both workflow instance and record iden…
🧭 Overview
In Joget, workflow tracking is essential for monitoring running or pending activities within business processes.
This implementation allows you to track workflow activities by their activity names (e.g., those containing "validate request") by joining Joget’s workflow tables.
The combination of SQL and DataList configuration provides an easy way to display:
- 🔢 Process IDs
- 🧾 Record IDs
- 👤 Pending Users
- ⚙️ Activity Details
⚙️ How It Works
Here’s the breakdown of how the query and DataList integration work together:
- 🧩 SHKAssignmentsTable stores assignment-level workflow information.
- 🔗 wf_process_link maps workflow process instances to their originating form records.
- ⚙️ The SQL
JOINretrieves both workflow instance and record identifiers. - 🔍
WHERE ActivityId LIKE '%validate%request%'filters workflow activities by name pattern. - 💡 DataList columns map the query results for display within Joget’s UI.
🧠 Full Code
📘 SQL Query
SELECT
shk.*,
wfl.originProcessId AS recordId
FROM
SHKAssignmentsTable AS shk
INNER JOIN
wf_process_link AS wfl
ON shk.ActivityProcessId = wfl.processId
WHERE
ActivityId LIKE '%validate%request%';
`
This query returns all workflow assignments for activities whose IDs or names contain "validate" and "request" — allowing you to trace specific approval or validation tasks.
🧱 DataList JSON Columns
{
"id": "column_9",
"name": "ResourceId",
"label": "Pending With",
"filterable": true,
"hidden": "false",
"sortable": "false"
},
{
"id": "column_1",
"name": "ActivityProcessId",
"label": "Process ID",
"filterable": true,
"hidden": "false",
"sortable": "false"
},
{
"id": "column_0",
"name": "recordId",
"label": "Record ID",
"filterable": true,
"hidden": "false",
"sortable": "false"
},
{
"id": "column_7",
"name": "ActivityId",
"label": "Activity ID",
"filterable": true,
"hidden": "false",
"sortable": "false"
},
{
"id": "column_6",
"name": "ActivityProcessDefName",
"label": "Activity Process Definition Name",
"filterable": true,
"hidden": "false",
"sortable": "false"
}
]```
## 💼 Example Use Cases
✅ Identify all pending “validation” tasks across multiple running workflows\.
✅ Quickly locate which users are holding specific process steps\.
✅ Monitor validation-related approvals for auditing or SLA tracking\.
✅ Build a **Workflow Tracker Dashboard** within Joget using a DataList and this query\.
---
## 🎨 Customization Tips
💡 Modify the `LIKE` condition to match any keyword \(e\.g\., `%approval%` or `%review%`\)\.
⚙️ Add date filters \(`shk.DateCreated`\) for recent activity monitoring\.
🔁 Join with `SHKActivitiesTable` to include activity names or durations\.
📊 Use **Datalist Formatter Plugins** for color-coded task states \(e\.g\., Overdue, Pending\)\.
---
## 🚀 Key Benefits
✅ Provides full visibility into active workflow states\.
⚡ Reduces dependency on manual process tracking\.
📈 Enables performance dashboards for process bottlenecks\.
🔎 Easy to extend with filters and user-based views\.
---
## 🔐 Security Note
⚠️ Ensure that only authorized users \(e\.g\., administrators or process owners\) have access to this DataList\.
⚠️ Avoid exposing sensitive `ResourceId` or `ProcessId` fields to public users\.
⚠️ Apply **Joget permission controls** \(e\.g\., Userview Permission\) on the DataList page\.
---
## 🧩 Final Thoughts
This workflow tracking implementation helps administrators and managers gain real-time insights into active Joget processes by activity name\.
It’s a powerful tool for **auditing, debugging, and reporting** in large workflow environments\.