0 votes
18 views
ago by (30.6k points)
Sometimes Process Admin is too slow or too limited and we go to the BPMDB with SQL. Which LSW tables hold instances, tasks, tokens and event manager work, and what must we never do?

1 Answer

0 votes
ago by (30.6k points)

The runtime tables (BPMDB, schema of the Process Server) that operations teams read - names are stable since 8.5 with small additions per release:

TableContentUseful columns
LSW_BPD_INSTANCEprocess instancesBPD_INSTANCE_ID (the 2072.x number), NAME, EXECUTION_STATUS (numeric state codes, values per release), BPD_REF (model id), SNAPSHOT_ID, CREATE_DATETIME, CLOSE_DATETIME, DUE_DATE
LSW_TASKtasks (user and system)TASK_ID (2078.x), BPD_INSTANCE_ID, STATUS (Received / Closed …), USER_ID (assigned user), GROUP_ID (team), SUBJECT, PRIORITY, DUE_DATE, CLOSED_DATETIME
LSW_BPD_INSTANCE_VARIABLESexposed business data (searchable variables) per instanceBPD_INSTANCE_ID, NAME, VALUE
LSW_EM_TASK and related EM tablesevent manager work (timers, UCAs, async steps)status, scheduled time, retry count, description
LSW_USR_XREF, LSW_USR_GRP_XREF, LSW_USR_GRP_MEM_XREFusers, groups, memberships as BPM knows themUSER_NAME, GROUP_NAME
LSW_SNAPSHOT, LSW_PROJECT, LSW_BRANCHinstalled snapshots / apps / tracksids, names, acronyms, default flags
LSW_BPD_INSTANCE_DATA and the execution context tablesserialised execution contexts (BLOB)not readable - use the REST API
-- open tasks older than 5 days by team (read-only reporting)
select g.group_name, count(*) from lsw_task t join lsw_usr_grp_xref g on g.group_id = t.group_id
 where t.status = 'Received' and t.received_datetime < current timestamp - 5 days group by g.group_name;   -- column names per release
-- instances per state and app
select p.short_name, i.execution_status, count(*) from lsw_bpd_instance i join lsw_snapshot s on s.snapshot_id = i.snapshot_id join lsw_project p on p.project_id = s.project_id
 group by p.short_name, i.execution_status;

Rules: read only, with uncommitted-read isolation (WITH UR on Db2) so that you never block the engine; never update or delete rows (the engine caches and the execution context blobs reference them - corrupt instances follow); use the PDW for history and analytics; prefer the REST / Operations APIs where they exist (they are supported, the table layout is not); and expect columns to differ per release - check your level's tables before writing reports.

References

Related questions

723 questions

807 answers

98 comments

4.8k users

Join BPM Community Discord Channel

Welcome to BPM Tips Q&A, Community wiki/forum where you can ask questions and receive answers from other IBM BPM experts and members of the community. Users with 2000 points will automatically be promoted to expert level.
Created by Dosvak LLC
Our Youtube Channel
...