dbo.ATT_ZAttestationReset
SQL_STORED_PROCEDURE
Created 2025-06-27T18:01:11.487 · modified 2026-04-14T23:20:42.107 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
@SlotNumber | int | no |
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AttestationCase | OBJECT_OR_COLUMN | ||
| AttestationHelper | OBJECT_OR_COLUMN | ||
| AttestationHistory | OBJECT_OR_COLUMN | ||
| AttestationPolicy | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionContextSet | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueCurrent | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBMDBQueueCurrent | OBJECT_OR_COLUMN | ||
| QER_PGIQERWorkingMethod | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVElementToObjectKey1 | OBJECT_OR_COLUMN | |
| dbo | QBM_FCVStringTrimLDSPrefix | OBJECT_OR_COLUMN | |
| dbo | QBM_FGISessionContext | 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 ATT_ZAttestationReset (@SlotNumber int) as begin declare @UID_AttestationCase varchar(38) declare @UID_AttestationHistory 2 varchar(38) declare @GenProcID varchar(38) declare @DebugLevel char(1) = 'W' declare @UID_QERWorkingMethod varchar(38) declare @UID_PWODecisionMethod 3varchar(38) declare @GenProcID_R varchar(38) = dbo.QBM_FGISessionContext('') declare @ElementLast int declare @ElementCount int declare @ElementIndex int 4 declare @DBQueueCurrent QBM_YDBQueueCurrent BEGIN TRY insert into @DBQueueCurrent(UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID) select 5 UID_DialogDBQueue, UID_Parameter, UID_SubParameter, GenProcID from QBMDBQueueCurrent cu with (readpast) where cu.SlotNumber = @SlotNumber if @@rowcount 6 = 0 begin goto EndLabel end declare @ElementBuffer_reset QBM_YCursorBuffer insert into @ElementBuffer_reset (UID1, UID2, UID3) select c.uid_Parameter 7, c.GenProcID, p.UID_PWODecisionMethod from @DBQueueCurrent c join AttestationCase ac on c.UID_Parameter = ac.UID_AttestationCase join AttestationPolicy 8 p on ac.UID_AttestationPolicy = p.UID_AttestationPolicy select @ElementCount = @@ROWCOUNT select @ElementIndex = @@IDENTITY - @ElementCount +1 select 9@ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 1 @UID_AttestationCase = bu.UID1 , @GenProcID = bu.UID2 , @UID_PWODecisionMethod 10 = bu.UID3 from @ElementBuffer_reset bu where bu.ElementIndex = @ElementIndex exec QER_PGIQERWorkingMethod @UID_PWODecisionMethod, '' , @UID_QERWorkingMethod 11 output exec QBM_PSessionContextSet 'GenProcID', @GenProcID delete AttestationHelper where UID_AttestationCase = @UID_AttestationCase exec QBM_PSessionContextSet 12 'GenProcID', @GenProcID update AttestationCase set decisionlevel = 0, DisplayPersonHead = null, DateHead = GetUTCDate(), ReasonHead = dbo.QBM_FCVStringTrimLDSPrefix 13('#LDS#Procedure deferred due to changed decision.|'), XDateUpdated = GetUTCDate(), XUserUpdated = 'DBScheduler' , UID_QERWorkingMethod = @UID_QERWorkingMethod 14 where UID_AttestationCase = @UID_AttestationCase select @ElementIndex += 1 end declare @ElementBuffer_history QBM_YCursorBuffer insert into @ElementBuffer_history 15 (UID1, UID2, UID3) select p.uid_parameter, newid(), p.GenProcID from @DBQueueCurrent p select @ElementCount = @@ROWCOUNT select @ElementIndex = @@IDENTITY 16 - @ElementCount +1 select @ElementLast = @@IDENTITY while @ElementIndex <= @ElementLast begin select top 1 @UID_AttestationCase = bu.UID1 , @UID_AttestationHistory 17 = bu.UID2 , @GenProcID = bu.UID3 from @ElementBuffer_history bu where bu.ElementIndex = @ElementIndex exec QBM_PSessionContextSet 'GenProcID', @GenProcID 18 insert into AttestationHistory (DecisionType, IsDecisionBySystem, UID_AttestationHistory, UID_PersonHead, UID_AttestationCase, DisplayPersonHead, ReasonHead 19, DateHead, XDateInserted, XDateUpdated, XUserInserted, XUserUpdated, DecisionLevel, XTouched, XObjectKey) select 'Reset', 1, @UID_AttestationHistory, 20null, @UID_AttestationCase, dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Automatic system approval.|') , dbo.QBM_FCVStringTrimLDSPrefix('#LDS#Procedure deferred due to changed decision.|' 21), GetUTCDate(), GetUTCDate(), GetUTCDate(), 'sa', 'sa', 0, '', dbo.QBM_FCVElementToObjectKey1('AttestationHistory', 'UID_AttestationHistory', @UID_AttestationHistory 22) select @ElementIndex += 1 end declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01 (object, subobject, genprocid) select x.uid 23, null, x.GenProcID from ( select uid_parameter as uid, p.GenProcID as GenProcID from @DBQueueCurrent p ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-AttestationHelper' 24, @DBQueueElements_01 END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: exec QBM_PSessionContextSet 25 'GenProcID', @GenProcID_R return end 26
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:42.107
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QER_PGIQERWorkingMethod, QBM_PSessionContextSet, QBM_PDBQueueInsert_Bulk, QBM_PSessionErrorAdd; writes INSERT into, INSERT AttestationHistory, UPDATE AttestationCase, DELETE AttestationHelper; reads/joins QBMDBQueueCurrent, AttestationCase, AttestationPolicy; uses session context GenProcID
Declared parameters
| Parameter | Type | Direction |
|---|---|---|
@SlotNumber | int | input |
DML targets
INSERT into INSERT AttestationHistory UPDATE AttestationCase DELETE AttestationHelperCalled routines
Read/join references
SQL dependency metadata
- AttestationCase
- AttestationHelper
- AttestationHistory
- AttestationPolicy
- QBM_PDBQueueInsert_Bulk
- QBM_PSessionContextSet
- QBM_PSessionErrorAdd
- QBM_YCursorBuffer
- QBM_YDBQueueCurrent
- QBM_YDBQueueRaw
- QBMDBQueueCurrent
- QER_PGIQERWorkingMethod
- dbo.QBM_FCVElementToObjectKey1
- dbo.QBM_FCVStringTrimLDSPrefix
- dbo.QBM_FGISessionContext
Config/session
Config: None extracted.
Session: GenProcID
DBQueue/tasks
ATT-K-AttestationHelperTemp tables / referenced variables
Temp: #LDS #Procedure #Automatic
Variables: @SlotNumber @UID_AttestationCase @UID_AttestationHistory @GenProcID @DebugLevel @UID_QERWorkingMethod @UID_PWODecisionMethod @GenProcID_R @ElementLast @ElementCount @ElementIndex @DBQueueCurrent @rowcount @ElementBuffer_reset @ROWCOUNT @IDENTITY @ElementBuffer_history @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.