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.

Open formatted source/search result

Parameters

NameTypeOutput
No parameters.

Referenced objects

SchemaObjectColumn/minorClass
AttestationCaseOBJECT_OR_COLUMN
AttestationObjectOBJECT_OR_COLUMN
AttestationPolicyOBJECT_OR_COLUMN
deletedOBJECT_OR_COLUMN
DialogTableOBJECT_OR_COLUMN
insertedOBJECT_OR_COLUMN
PWODecisionMethodOBJECT_OR_COLUMN
QBM_PDBQueueInsert_BulkOBJECT_OR_COLUMN
QBM_PSessionErrorAddOBJECT_OR_COLUMN
QBM_PSQLCheckExecutableOBJECT_OR_COLUMN
QBM_YCursorBufferTYPE
QBM_YDBQueueRawTYPE
QBM_YParameterListTYPE
QER_PITShopHelperFill_RecalcOBJECT_OR_COLUMN
QERWorkingMethodOBJECT_OR_COLUMN
dboQBM_FCVElementToObjectKey1OBJECT_OR_COLUMN
dboQBM_FGIConfigparmValueOBJECT_OR_COLUMN
dboQBM_FGISessionContextOBJECT_OR_COLUMN

Source excerpt

First extracted SQL definition lines from the exported source. Use the full source page for complete context.

Open full formatted source

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 not

Config/session

Config: QER\Attestation QER\Attestation\OnWorkflowAssign

Session: None extracted.

DBQueue/tasks

ATT-K-Attestation-RESET ATT-K-Attestation-ABORT ATT-K-HelperAttestationPolicy

Temp 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.