How to create a dashboard with workflow audit trail?
Modified on: Fri, 24 Dec, 2021 at 5:18 PM
The use case for this is the customer wants to see an audit trail of the workflow in the dashboard. The details like creator, updater, workflow task, entity details need to be displayed in the dashboard.
The workflow tasks is captured in the backend in multiple like
mta_wfi_event - This table keeps track of all the events of the workflow like ‘event comment’ , ‘Approver’ , ‘Taskname’ etc
mta_wflow_task - This table provides the granular details like ‘name’ - > workflow task , ‘approver’ etc
In the dashboard under the query section execute the following SQL query
WE.task_name as WorkFlowTask,
WE.event_comment as EventComments,
IL.LOADID, ME.name as EntityName
from semarchy_repository.mta_wflow_task WT,
semarchy_repository.mta_entity ME ,
where WE.O_WF_INSTANCE = IL.UUID and WE.EVENT_TYPE = 'TRANSITION'
and IL.STATUS = 'FINISHED'and WT.name = WE.task_name
The following screenshot displays query result on a sample entity.