dbo.ATT_TUAttestationPolicy
SQL_TRIGGER parent AttestationPolicy
Created 2025-06-27T18:01:12.097 · modified 2026-04-14T23:23:07.943 · source: live DB sys.objects/sys.sql_expression_dependencies.
Parameters
| Name | Type | Output |
|---|---|---|
| No parameters. | ||
Referenced objects
| Schema | Object | Column/minor | Class |
|---|---|---|---|
| AttestationCase | OBJECT_OR_COLUMN | ||
| AttestationObject | OBJECT_OR_COLUMN | ||
| AttestationPolicy | OBJECT_OR_COLUMN | ||
| deleted | OBJECT_OR_COLUMN | ||
| DialogTable | OBJECT_OR_COLUMN | ||
| inserted | OBJECT_OR_COLUMN | ||
| PWODecisionMethod | OBJECT_OR_COLUMN | ||
| QBM_PDBQueueInsert_Bulk | OBJECT_OR_COLUMN | ||
| QBM_PSessionErrorAdd | OBJECT_OR_COLUMN | ||
| QBM_PSQLCheckExecutable | OBJECT_OR_COLUMN | ||
| QBM_YCursorBuffer | TYPE | ||
| QBM_YDBQueueRaw | TYPE | ||
| QBM_YParameterList | TYPE | ||
| QER_PITShopHelperFill_Recalc | OBJECT_OR_COLUMN | ||
| QERWorkingMethod | OBJECT_OR_COLUMN | ||
| dbo | QBM_FCVElementToObjectKey1 | OBJECT_OR_COLUMN | |
| dbo | QBM_FGIConfigparmValue | 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.
1create trigger ATT_TUAttestationPolicy on AttestationPolicy for UPDATE not for Replication as begin declare @SQLToCheck QBM_YParameterList declare 2 @QER_Attestation_OnWorkflowAssign varchar(16) BEGIN TRY if exists (select top 1 1 from inserted) goto start if exists (select top 1 1 from deleted) goto 3 start return start: declare @GenProcID varchar(38) select @GenProcID = dbo.QBM_FGISessionContext('') if update(WhereClause) begin insert into @SQLToCheck 4(Parameter1, ContentFull) select c.XObjectKey, 'select top 1 1 as columnvalue from ' + t.TableName + ' 5 where ( 6 ' + c.WhereClause + ' 7 )' from 8 inserted c join AttestationObject o on c.UID_AttestationObject = o.UID_AttestationObject join DialogTable t on o.UID_DialogTable = t.UID_DialogTable 9where c.WhereClause > ' ' update @SQLToCheck set ContentFull = REPLACE (replace(ContentFull , '@UID_QERPickCategory', '''#''') , '@UID_AttestationPolicy' 10, '''#''') exec QBM_PSQLCheckExecutable @SQLToCheck, @RaiseError = 1 end if dbo.QBM_FGIConfigparmValue('QER\Attestation') = '' begin goto endLabel end 11if update(UID_PWODecisionMethod) begin select @QER_Attestation_OnWorkflowAssign = dbo.QBM_FGIConfigparmValue('QER\Attestation\OnWorkflowAssign') if @QER_Attestation_OnWorkflowAssign 12 in ('RESET', 'ABORT') begin declare @DBQueueElements_01 QBM_YDBQueueRaw insert into @DBQueueElements_01(Object, SubObject, GenProcID) select x.uid, null 13, @GenProcID from ( select ac.UID_AttestationCase as uid from AttestationPolicy po join deleted d on po.UID_AttestationPolicy = d.UID_AttestationPolicy 14 and isnull(po.UID_PWODecisionMethod, '') <> isnull(d.UID_PWODecisionMethod, '') and po.UID_PWODecisionMethod > ' ' join PWODecisionMethod m on d.UID_PWODecisionMethod 15 = m.UID_PWODecisionMethod join QERWorkingMethod wm on wm.UID_PWODecisionSubMethod = m.UID_SubMethodOrderProduct join AttestationCase ac on ac.UID_QERWorkingMethod 16 = wm.UID_QERWorkingMethod and ac.IsClosed = 0 ) as x if @QER_Attestation_OnWorkflowAssign = 'RESET' begin exec QBM_PDBQueueInsert_Bulk 'ATT-K-Attestation-RESET' 17, @DBQueueElements_01 end if @QER_Attestation_OnWorkflowAssign = 'ABORT' begin exec QBM_PDBQueueInsert_Bulk'ATT-K-Attestation-ABORT', @DBQueueElements_01 18 end end declare @DBQueueElements_02 QBM_YDBQueueRaw insert into @DBQueueElements_02(Object, SubObject, GenProcID) select x.uid, null, @GenProcID from 19 ( select ac.UID_AttestationCase as uid from AttestationPolicy po join deleted d on po.UID_AttestationPolicy = d.UID_AttestationPolicy and isnull(po.UID_PWODecisionMethod 20, '') <> isnull(d.UID_PWODecisionMethod, '') and po.UID_PWODecisionMethod is null join PWODecisionMethod m on d.UID_PWODecisionMethod = m.UID_PWODecisionMethod 21 join QERWorkingMethod wm on wm.UID_PWODecisionSubMethod = m.UID_SubMethodOrderProduct join AttestationCase ac on ac.UID_QERWorkingMethod = wm.UID_QERWorkingMethod 22 and ac.IsClosed = 0 ) as x exec QBM_PDBQueueInsert_Bulk'ATT-K-Attestation-ABORT', @DBQueueElements_02 end if update(IsInactive) begin declare @DBQueueElements_03 23 QBM_YDBQueueRaw insert into @DBQueueElements_03 (object, subobject, genprocid) select x.uid, null, @GenProcID from ( select uid_AttestationPolicy as uid 24 from inserted ) as x exec QBM_PDBQueueInsert_Bulk 'ATT-K-HelperAttestationPolicy', @DBQueueElements_03 end if UPDATE(UID_AERoleOwner) begin declare @RecalcParameter_01 25 QBM_YCursorBuffer insert into @RecalcParameter_01 (ObjectKey1, UID1, Ident1) select dbo.QBM_FCVElementToObjectKey1('AERole', '', i.UID_AERoleOwner), 26v.UID_PWODecisionRule, 'A' from inserted i cross join (values ('ATT-PWODecisionRule-PW') ) as v (UID_PWODecisionRule) exec QER_PITShopHelperFill_Recalc 27 @RecalcParameter_01, @GenprocID end END TRY BEGIN CATCH exec QBM_PSessionErrorAdd default RAISERROR ('', 18, 1) WITH NOWAIT END CATCH endLabel: return 28 end 29
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:23:07.943
inserts DBQueue tasks uses session context values has TRY/CATCH error handling
Summary: calls QBM_PSQLCheckExecutable, QBM_PDBQueueInsert_Bulk, QER_PITShopHelperFill_Recalc, QBM_PSessionErrorAdd; writes INSERT into, UPDATE not; reads/joins inserted, deleted, AttestationObject, DialogTable, AttestationPolicy…; uses config QER\Attestation, QER\Attestation\OnWorkflowAssign
Declared parameters
No declared parameters in sys.parameters for this object, or metadata was not available.
DML targets
INSERT into UPDATE notCalled routines
Read/join references
SQL dependency metadata
- AttestationCase
- AttestationObject
- AttestationPolicy
- deleted
- DialogTable
- inserted
- PWODecisionMethod
- QBM_PDBQueueInsert_Bulk
- QBM_PSessionErrorAdd
- QBM_PSQLCheckExecutable
- QBM_YCursorBuffer
- QBM_YDBQueueRaw
- QBM_YParameterList
- QER_PITShopHelperFill_Recalc
- QERWorkingMethod
- dbo.QBM_FCVElementToObjectKey1
- dbo.QBM_FGIConfigparmValue
- dbo.QBM_FGISessionContext
Config/session
Config: QER\Attestation QER\Attestation\OnWorkflowAssign
Session: None extracted.
DBQueue/tasks
ATT-K-Attestation-RESET ATT-K-Attestation-ABORT ATT-K-HelperAttestationPolicyTemp tables / referenced variables
Temp: None extracted.
Variables: @SQLToCheck @QER_Attestation_OnWorkflowAssign @GenProcID @UID_QERPickCategory @UID_AttestationPolicy @RaiseError @DBQueueElements_01 @DBQueueElements_02 @DBQueueElements_03 @RecalcParameter_01 @GenprocID
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.