dbo.QBM_ZProcessChainStateUpdate
SQL_STORED_PROCEDURE
Created 2025-06-27T17:58:58.727 · modified 2026-04-14T23:20:29.460 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| DialogProcessChain | OBJECT_OR_COLUMN | ||
| DialogProcessStep | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YMNTable | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN |
Source excerpt
First extracted SQL definition lines from the exported source. Use the full source page for complete context.
1 create procedure QBM_ZProcessChainStateUpdate (@SlotNumber int) AS begin declare @XUser nvarchar(64) = object_name(@@procid) declare 2@Xdate datetime = getutcdate() BEGIN TRY declare @Hilfstabelle QBM_YMNTable insert into @Hilfstabelle (UID_Element1 , UID_Element2 ) select y.uid_parameter 3 , w.ChainState from ( select p.uid_parameter, sum(distinct x.StateLevel) as StateLevel from QBMDBQueueCurrent p with (readpast) join DialogProcessChain 4 c on p.uid_parameter = c.uid_tree left outer join DialogProcessStep s on c.uid_tree = s.uid_tree left outer join ( values ('F', 4) ,( 'E', 8) ,('L' 5, 1) ,('D', 1) ,('P', 1) ,('G', 2) ,('N', 0) ,('#', 8) ) as x (JobState, StateLevel) on isnull(s.ProcessState, '#') = x.JobState where p.SlotNumber = 6@SlotNumber group by p.uid_parameter ) as y join ( values ( 1, 'P') ,( 2, 'G') ,( 3, 'P') ,( 4, 'F') ,( 5, 'P') ,( 6, 'P') ,( 7, 'P') ,( 8, 'E') ,( 9, 7 'P') ,(10, 'P') ,(11, 'P') ,(12, 'F') ,(13, 'P') ,(14, 'P') ,(15, 'P') ,( 0, 'G') ) as w (StateLevel , ChainState ) on y.StateLevel = w.StateLevel update 8 DialogProcessChain set ProcessState = w.UID_Element2 , XDateUpdated = @Xdate , XUserUpdated = @XUser from DialogProcessChain, @Hilfstabelle w where 9DialogProcessChain.uid_tree = w.UID_Element1 and isnull(DialogProcessChain.ProcessState,'') <> w.UID_Element2 declare @DBQueueElements_01 QBM_YDBQueueRaw 10 insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid, null, x.uid from ( select distinct c.GenProcID as uid from @Hilfstabelle 11 s1 join DialogProcessChain c on s1.UID_Element1 =c.uid_Tree ) as x exec QBM_PDBQueueInsert_Bulk 'QBM-K-CommonProcess', @DBQueueElements_01 END TRY BEGIN 12 CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH ende: end 13
Module relation graph
Loading module relation graph…
Source-derived context
Generated from exported SQL module definitions plus read-only sandbox sys.objects/sys.parameters/sys.sql_expression_dependencies metadata. This is factual source evidence, not a semantic guess.
provenance: SQL definition export provenance: sandbox DB metadata modified: 2026-04-14T23:20:29.460
inserts DBQueue tasks has TRY/CATCH error handling
Summary: calls QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, UPDATE DialogProcessChain; reads/joins QBMDBQueueCurrent, DialogProcessChain, DialogProcessStep
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT into UPDATE DialogProcessChainCalled routines
Read/join references
SQL dependency metadata
Config/session
Config: None extracted.
Session: None extracted.
DBQueue/tasks
QBM-K-CommonProcessTemp tables / referenced variables
Temp: None extracted.
Variables: @SlotNumber @XUser @procid @Xdate @Hilfstabelle @DBQueueElements_01
Referenced by / reverse dependencies
Generated from live DB metadata, FK rows, and exported SQL dependency/source extraction. This is factual linkage evidence, not inferred behavior.
No reverse dependencies extracted.